Followed the cake example. About for sure.
Router::mapResources('incidentReports'); Router::parseExtensions('json');
Both before
require CAKE . 'Config' . DS . 'routes.php';
My controller is called IncidentReportsController
class IncidentReportsController extends AppController {
What contains the functions
index() view($id) add() edit($id) delete($id)
Go to URL
www.myurl.com/incidentReports.json
Sends a request to index () as expected.
Go to URL
www.myurl.com/incidentReports/260.json
You must map the view () functions, but try to map the 260 () function, which does not exist.
www.myurl.com/incidentReports/view/260.json
Whether the view () function is displayed and is working correctly. However, I understand that the “submission” in the URL should not be necessary.
source share