Skip to content

Instantly share code, notes, and snippets.

@cakephp-tutorial
Last active February 26, 2016 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cakephp-tutorial/2887cc1cf5062c81e01a to your computer and use it in GitHub Desktop.
Save cakephp-tutorial/2887cc1cf5062c81e01a to your computer and use it in GitHub Desktop.
CakePHP 2 Routes
<?php
//esempio senza pass
Router::connect(
'/controller001/:id',
array('action' => 'view'),
array('id' => '[0-9]+')
);
//esempio con pass
Router::connect(
'/controller002/:id',
array('action' => 'view'),
array(
'pass' => array('id'),
'id' => '[0-9]+'
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment