simplify line
This commit is contained in:
parent
6f1f40bc94
commit
e265156bc6
|
@ -18,9 +18,7 @@ class RedirectIfAuthenticated
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next, ...$guards)
|
public function handle($request, Closure $next, ...$guards)
|
||||||
{
|
{
|
||||||
if (empty($guards)) {
|
$guards = empty($guards) ? [null] : $guards;
|
||||||
$guards = [null];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($guards as $guard) {
|
foreach ($guards as $guard) {
|
||||||
if (Auth::guard($guard)->check()) {
|
if (Auth::guard($guard)->check()) {
|
||||||
|
|
Loading…
Reference in New Issue