/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if ($this->auth->check()) { return new RedirectResponse(url('/')); } return $next($request); }
/** * Default Page * @param \Illuminate\Contracts\Auth\Authenticator $auth * @return \Illuminate\View\View */ public function defaultPage(Authenticator $auth) { if ($auth->check()) { return $this->redirect(); } return view('pages.default'); }
/** * Determine if the user is authorized to make this request. * * @param \Illuminate\Contracts\Auth\Authenticator $auth * @return bool */ public function authorize(Authenticator $auth) { return $auth->check(); }
/** * Run the request filter. * * @return mixed */ public function filter() { if ($this->auth->check()) { return new RedirectResponse(url('/')); } }