Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class Controller_Base extends Controller{
- public function before(){
- parent::before();
- Auth::_init();
- if (Input::get('logout')){
- Auth::logout();
- Response::redirect($this->request->uri);
- }
- }
- }
- //route
- array(
- 'admin/(:any)' => !(Auth::check()) ? 'admin/admin/login' : 'admin/admin/$1' ,
- );
Add Comment
Please, Sign In to add comment