From e265156bc69d2752a091526e1308e1a26cf5bd4e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 14 Jul 2020 15:12:37 -0500 Subject: [PATCH] simplify line --- app/Http/Middleware/RedirectIfAuthenticated.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index de91a524..ef9badc0 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -18,9 +18,7 @@ class RedirectIfAuthenticated */ public function handle($request, Closure $next, ...$guards) { - if (empty($guards)) { - $guards = [null]; - } + $guards = empty($guards) ? [null] : $guards; foreach ($guards as $guard) { if (Auth::guard($guard)->check()) {