Created
February 26, 2016 23:13
-
-
Save cakephp-tutorial/a4caa3ca18f1c130350a to your computer and use it in GitHub Desktop.
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
<?php | |
//url /hobbies/10/roma | |
Router::connect( | |
'hobbies/:id/:city', | |
array( | |
'controller' => 'hobbies', | |
'action' => 'search' | |
), | |
array( | |
'pass' => array('id', 'city'), | |
'id' => '[0-9]+', | |
) | |
); | |
//url /hobbies/roma/10 | |
Router::connect( | |
'hobbies/:city/:id', | |
array( | |
'controller' => 'hobbies', | |
'action' => 'search' | |
), | |
array( | |
'pass' => array('id', 'city'), | |
'id' => '[0-9]+', | |
) | |
); | |
// public function search($id, $city) .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment