auth = $auth; } /** * Handle an incoming request. * * @param \Symfony\Component\HttpFoundation\Request $request * @param \Closure $next * @return \Symfony\Component\HttpFoundation\Response */ public function handle($request, Closure $next) { if ($this->auth->check()) { return new RedirectResponse(url('/')); } return $next($request); } }