Question: How to pass arguments to a url in CakePHP
Solution:
In app/Config/routes.phg
Router::connect('/:arg', array('controller' => 'homes', 'action' => 'index', 'pass' => ['arg']));
Inside Homes/index()
index()
{
...
$passedOne = $this -> request -> params["arg"];
...
}
Hope it will be of use to someone. :D
Top comments (0)