Beispiel #1
0
 /**
  * Is user is not logged in, redirect to login
  */
 public static function requireAuthenticated()
 {
     if (Auth::isGuest()) {
         $response = new Response();
         $response->redirect(url('/auth/login'));
         $response->sendResponse();
     }
 }
Beispiel #2
0
 public function login()
 {
     if (Auth::login($_POST['email'], $_POST['password'], isset($_POST['remember_me']))) {
         redirect(url('/'));
         return true;
     }
     redirect(url('/auth/login'));
     return false;
 }