authManager = $authManager; } /** * Handle an incoming request. * * @return mixed */ public function handle(Request $request, Closure $next, string $guard = null) { if ($this->authManager->guard($guard)->check()) { return redirect()->route('index'); } return $next($request); } }