Run the request filter.

@param  \Illuminate\Http\Request  $request
@param  \Closure  $next
@return mixed
164308
public function handle(Request $request, Closure $next, $resource = null, $permission = null)
    {
        if ($this->auth->guest()) {
            if (!$this->acl->isAllowed('guest', $resource, $permission)) {
                return $this->notAllowed($request);
            }
        } elseif (!$this->acl->isAllowed($this->auth->user(), $resource, $permission)) {
            return $this->notAllowed($request);
        }

        return $next($request);
    }
200149
public function handle($request, Closure $next)
    {
        if (!$this->debugbar->isEnabled()) {
            abort(404);
        }

        return $next($request);

    }
1054986
public function handle($request, Closure $next)
    {
        $this->credentials->getThrottleProvider()->enable();

        return $next($request);
    }
252689
public function handle($request, Closure $next)
    {
        if (Config::get('tracker.enabled')) {
            app('tracker')->boot();
        }

        return $next($request);
    }
259493
public function handle(Request $request, Closure $next)
    {
        // set curent user preferences to Config
        if ($user = $request->user()) {
            Config::set('typicms.user', $user->preferences);
        }

        return $next($request);
    }
1280234
public function handle($request, Closure $next)
    {
        if ($this->shouldExecute($request)) {
            return $this->before($request, $next);
        }

        return $next($request);
    }
1092459
public function handle($request, Closure $next)
    {
        $locale = $request->segment(1);

        $language = Language::findByCode($locale);

        if ($language) {
            App::setLocale($language->code);
            $request->setDefaultLocale($language->code);
        } else {
            $request->setDefaultLocale(config('app.locale'));
        }

        return $next($request);
    }
801350
public function handle($request, Closure $next)
    {
        $this->attributes = array_slice(func_get_args(), 2);

        $this->clean($request);

        return $next($request);
    }
1304649
public function handle($request, Closure $next)
    {
        $modelName = $request->route()->parameter('model');

        app()->singleton('itemconfig', function ($app) use ($modelName) {
            $configFactory = app('admin_config_factory');

            return $configFactory->make($modelName, true);
        });

        return $next($request);
    }
890253
public function handle(Request $request, Closure $next)
    {
        if (!$this->service->isCorsRequest($request)) {
            return $next($request);
        }

        if ($this->service->isPreflightRequest($request)) {
            return $this->service->handlePreflightRequest($request);
        }

        return $this->service->handleRequest($request, $next($request));
    }
362388
public function handle($request, Closure $next)
    {
        if ($this->auth->check() && $this->auth->user()->hasAccess($this->routeActive)) {
            return $next($request);
        } else {
            abort(404);
        }
    }
1289622
public function handle($request, Closure $next)
    {
        if (Gate::allows('admin', $this->auth->user())) {
            return $next($request);
        }

        return response()->view('errors.401', [], 401);
    }
1040215
public function handle($request, Closure $next)
    {
        $this->kernel->setClosure($next);

        return $this->middleware->handle($request);
    }
1027237
public function handle($request, Closure $next)
    {
        $locale = $this->localizer->detect();

        if ($locale) {
            $this->localizer->store($locale);
        }

        return $next($request);
    }
611914
public function handle($request, Closure $next)
    {
        $paginationKey = config('pagination.key');

        $request->offsetSet($paginationKey, $request->paginationCount());

        return $next($request);
    }
70296
public function handle($request, Closure $next)
    {
        if (!$this->auth->check())
            return redirect()->guest(route('admin.login'));

        app(Gate::class)->authorize('admin.dashboard');

        return $next($request);
    }
751922
public function handle($request, \Closure $next)
    {
        try {
            $this->getOAuth2Service()->validateAccessToken();

            return $next($request);
        } catch (OAuthException $e) {
            return $this->accessDeniedResponse('ERROR.ACCESS_DENIED');
        }
    }