Reputation: 3384
Can anyone tell me how to pass parameters to a function in another controller in cakephp?
Upvotes: 3
Views: 4408
Reputation: 522606
How are you calling that controller? If you're redirecting the user and want to pass some URL parameters (which will be passed to the controller action), just do this:
$this->redirect(array('controller' => 'foo', 'action' => 'bar', $myParam));
Upvotes: 4