simplify line
This commit is contained in:
@@ -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()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user