You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you get an error when you use that route? If so, what does it say?
That route looks fine - if you have that route, with the URL /contacts/index/5, the framework will run the indexAction method in the Contacts controller. The ID from the route will be available in the route_params property of the current controller, e.g.
public function indexAction()
{
$id = $this->route_params['id'];
}
Hello thank you for your awesome framework.
However I am at loss on how to add parameters after the action.
What I wish to accomplish is this:
/controller/action/id such example as /contacts/index/5 to read contact with id 5
Every iteration i do gives error on Router.php
I have added this $router->add('{controller}/{action}/{id:\d+}'); to the routes but not doing anything.
The text was updated successfully, but these errors were encountered: