Using the Rewrite API to Construct a RESTful URL

Posted by Prem Tiwari | Updated on

I would separate the logic into three parts: a controller select a model and a view, a model to handle the endpoint and one or more views to return some useful data or error messages.

Let’s start with the controller. It doesn’t do much, so I use a very simple function here:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers