Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.