simplify line

This commit is contained in:
Taylor Otwell 2020-07-14 15:12:37 -05:00
parent 6f1f40bc94
commit e265156bc6
1 changed files with 1 additions and 3 deletions

View File

@ -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()) {