Have an application using phalcon and I wants routes URLs like this :
http://localhost/my-website/admin/cat -> use the "cat" controller and not the "admin" controller
Have done this and its works
$router = new Phalcon\Mvc\Router();
$router->add(
"/admin/cat",
array(
"controller" => "cat",
"action" => "index"
)
);
but how to route things like :
http://localhost/my-website/admin/cat/updatecat/22 -> use the "cat" controller with action "updatecat" and parameter "22" and not the "admin" controller
Phalcon PHP custom route
This is how you do a custom route like yours:
You pickup the param in the controller like this: