Quick tip how to use url() in the controller – CakePHP

Sometimes you need to use url() in the controller.

It’s possible to use Html Helper in this case, but for url() only, you can use:

$link = Router::url(array('controller'=>'my_controller', 'action'=>'my_acton'), false);

Wll, not a rocket science indeed, but let’s hope this help someone.

2 thoughts on “Quick tip how to use url() in the controller – CakePHP

Leave a Reply

Your email address will not be published. Required fields are marked *