/**
* Return array of the Collections, which define a group of routes, from
* routes/collections. These will be mounted into the app itself later.
*/
$di->set('router', function(){
$oRouter = new \Phalcon\Mvc\Router();
//Define a route
$oRouter->addGet(
"/admin/users/my-profile",
array(
"controller" => "users",
"action" => "profile",
)
);
//Another route
$oRouter->addGet(
"/admin/users/change-password",
array(
"controller" => "users",
"action" => "changePassword",
)
);
return $oRouter;
});
i trying to use overwrite the router in micro app. (intend to using modify the cmoore4/phalcon-rest)
However, the results came out the route has not been added.
{"_meta":{"status":"SUCCESS","count":7},"records":{"gET":["\/"],"pOST":[],"pUT":[],"pATCH":[],"dELETE":[],"hEAD":[],"oPTIONS":[]}}
do i have a problem with this my codes ?