diff --git a/src/Illuminate/Auth/GuardHelpers.php b/src/Illuminate/Auth/GuardHelpers.php index 21094bf8a82b..9cdf69776c2e 100644 --- a/src/Illuminate/Auth/GuardHelpers.php +++ b/src/Illuminate/Auth/GuardHelpers.php @@ -33,11 +33,7 @@ trait GuardHelpers */ public function authenticate() { - if (! is_null($user = $this->user())) { - return $user; - } - - throw new AuthenticationException; + return $this->user() ?? throw new AuthenticationException; } /**