示例#1
0
 /**
  * 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();
 }
示例#4
0
 /**
  * Run the request filter.
  *
  * @return mixed
  */
 public function filter()
 {
     if ($this->auth->check()) {
         return new RedirectResponse(url('/'));
     }
 }