Skip to content

Instantly share code, notes, and snippets.

@agborkowski
Forked from notomato/gist:3376894
Created July 22, 2013 21:19
Show Gist options
  • Save agborkowski/6057799 to your computer and use it in GitHub Desktop.
Save agborkowski/6057799 to your computer and use it in GitHub Desktop.
<?php
// somewhere in config/bootstrap
Dispatcher::config(array('rules' => array(
'admin' => array(
'action' => 'admin_{:action}'
)
)));
// app/classes/PostsController.php
class PostsController extends Base {
public function admin_index() {
//...
}
public function index() {
//...
}
}
// config/routes.php
Router::connect(
'/admin/{:args}',
array('admin' => true),
array('continue' => true)
);
// source: http://www.slideshare.net/nateabele/the-state-of-lithium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment