Guest User

Untitled

a guest
May 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. abstract class Controller_Base extends Controller{
  2.  
  3.     public function before(){
  4.        
  5.         parent::before();      
  6.         Auth::_init();
  7.         if (Input::get('logout')){
  8.             Auth::logout();
  9.             Response::redirect($this->request->uri);
  10.         }
  11.        
  12.     }
  13.      
  14.  
  15. }
  16.  
  17.  
  18. //route
  19. array(
  20.   'admin/(:any)'    => !(Auth::check()) ? 'admin/admin/login' : 'admin/admin/$1' ,
  21. );
Add Comment
Please, Sign In to add comment