Skip to content

Instantly share code, notes, and snippets.

@mosbth
Created April 7, 2014 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosbth/10024344 to your computer and use it in GitHub Desktop.
Save mosbth/10024344 to your computer and use it in GitHub Desktop.
Dispatch Anax MVC with params
Först.
$app->dispatcher->forward([
'controller' => 'comment',
'action' => 'view',
'params' => ['the-comment-key-to-this-page'],
]);
Och ta emot parametern på "vanligt sätt" i Controllern, se parametern $key.
/**
* View all comments.
*
* @return void
*/
public function viewAction($key = null)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment