Skip to content

Instantly share code, notes, and snippets.

@marcincodes
marcincodes / gist:7397947
Created November 10, 2013 12:59
Router do paginacji
//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]+'
)
);
//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]+'
)
);