Skip to content

Instantly share code, notes, and snippets.

@jpleau
Created November 24, 2012 14:43
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 jpleau/4139939 to your computer and use it in GitHub Desktop.
Save jpleau/4139939 to your computer and use it in GitHub Desktop.
$_controllers = array(
'projects' => 'projets',
'floors' => 'etages',
'unit_types' => 'type_unites',
'units' => 'unites',
);
foreach ($_controllers as $original => $new) {
Router::connect('/' . $new, array('controller' => $original, 'action' => 'index'));
Router::connect('/' . $new . '/:action/*', array('controller' => $original));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment