/**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (Auth::guest() && !$this->shouldPassThrough($request)) {
         return redirect()->guest(Admin::url('auth/login'));
     }
     return $next($request);
 }
Beispiel #2
0
 public function user()
 {
     return Auth::user();
 }