This file contains hidden or 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
| //routes.php | |
| Router::connect( | |
| '/forum/:id-:slug/*', // E.g. /blog/3-CakePHP_Rocks | |
| array('controller' => 'forum', 'action' => 'show'), | |
| array( | |
| // order matters since this will simply map ":id" to $articleId in your action | |
| 'pass' => array('id', 'slug'), | |
| 'id' => '[0-9]+' | |
| ) | |
| ); |
This file contains hidden or 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
| //Router wyglada tak | |
| Router::connect( | |
| '/forum/:id-:slug', // E.g. /blog/3-CakePHP_Rocks | |
| array('controller' => 'forum', 'action' => 'show'), | |
| array( | |
| // order matters since this will simply map ":id" to $articleId in your action | |
| 'pass' => array('id', 'slug'), | |
| 'id' => '[0-9]+' | |
| ) | |
| ); |
NewerOlder