Created
April 7, 2014 17:14
-
-
Save mosbth/10024344 to your computer and use it in GitHub Desktop.
Dispatch Anax MVC with params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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