Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. * @return \Illuminate\Contracts\Auth\Authenticatable
  2.      *
  3.      * @throws \Illuminate\Auth\AuthenticationException
  4.      */
  5.     public function authenticate()
  6.     {
  7.         if (! is_null($user = $this->user())) {
  8.             return $user;
  9.         }
  10.  
  11.         throw new AuthenticationException;
  12.     }
  13.  
  14.     /**
  15.      * Determine if the current user is authenticated.
  16.      *
  17.      * @return bool
  18.      */
  19.     public function check()
  20.     {
  21.         return ! is_null($this->user());
  22.     }
  23.  
  24.     /**
  25.      * Determine if the current user is a guest.
  26.      *
  27.      * @return bool
  28.      */
  29.     public function guest()
  30.     {
  31.         return ! $this->check();
  32. Arguments
  33. "Unauthenticated."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement