Run the request filter.

@param \Illuminate\Http\Request $request
@param \Closure                 $next

@return mixed
776011
public function handle($request, Closure $next)
    {
        if (! session('links.password') || (Crypt::decrypt(session('links.password')) != config('links.password'))) {
            return redirect()
                ->route('links::login')
                ->with('msg', 'Your login has expired or does not exist.');
        }

        return $next($request);
    }
953052
public function handle($request, Closure $next)
    {
        $locale = \LocaleHelper::getLocale();
        app()->setLocale($locale);

        return $next($request);
    }
702526
public function handle($request, Closure $next)
    {
        $request->setTrustedProxies([
            $request->getClientIp(),
        ]);

        if (!$request->secure() && app()->environment('production')) {
                return redirect()->secure($request->getRequestUri());
        }

        return $next($request);
    }
582320
public function handle($request, Closure $next)
    {

        if (!$request->isSecure() and env('SECURE_COOKIE', false)) {
            if (strpos($request->getRequestUri(), '/storage/') === false) {
                return redirect()->secure($request->getRequestUri());
            }

        }

        return $next($request);
    }
1138221
public function handle(Request $request, Closure $next)
    {
        if (!empty($paths = $this->guardedPaths($request))) {
            $request->merge(
                array_map([$this, 'sanitizePath'], $paths)
            );
        }

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

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

        return $next($request);
    }
1040215
public function handle($request, Closure $next)
    {
        $this->kernel->setClosure($next);

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

        return $next($request);
    }
1119153
public function handle(Request $request, Closure $next)
    {
        $request = $this->processRequest($request);
        return $next($request);
    }
729059
public function handle($request, Closure $next)
    {
        $acceptLanguage = $request->header('Accept-Language');
        $locale = $this->getLocale($acceptLanguage);
        \App::setLocale($locale);
        return $next($request);
    }
1005105
public function handle($request, Closure $next)
    {
        if (config('https.force') && ! $request->isSecure()) {
            return Redirect::secure($request->path());
        }

        return $next($request);
    }
491144
public function handle(Request $request, Closure $next)
    {

        $fields = array_slice(func_get_args(), 2);

        foreach ($fields as $field) {
            $hiddenField = '_'.$field;
            if ($request->has($hiddenField)) {
                $request->merge([$field => $this->formatDate($request->get($hiddenField))]);
            }
        }

        return $next($request);
    }
1231658
public function handle($request, Closure $next)
    {
        $this->authorizer->setRequest($request);

        $this->authorizer->checkAuthCodeRequest();

        return $next($request);
    }
1004404
public function handle(\Illuminate\Http\Request $request, \Closure $next)
    {
        // Get Route's Actions
        $action = $request->route()->getAction();

        if(isset($action['filter']['before'])) {
            // Apply 'Before' Filters
            foreach ($action['filter']['before'] as $key => $value) {
                if (is_string($value)) {
                    if (function_exists(parent::$value())) {
                        $this->$value();
                    }
                }
            }
        }

        // Handle Request
        $this->response = $next($request);

        if(isset($action['filter']['after'])) {
            // Apply 'After' Filters
            foreach ($action['filter']['after'] as $key => $value) {
                if (is_string($value)) {
                    if (function_exists(parent::$value())) {
                        $this->$value();
                    }
                }
            }
        }

        // Return Response
        return $this->response;
    }
888282
public function handle($request, Closure $next)
    {
        if ($class = AdminManager::getAdminInstance()) {
            $class = get_class($class);
        }

        if (!$this->permissions->check($class)) {
            return $this->permissions->denied($class);
        }

        return $next($request);
    }
676365
public function handle(Request $request, Closure $next)
    {
        if ($request->ajax() || $request->wantsJson()) {
            return $next($request);
        }

        return response('Method not allowed', 405);
    }
4140
public function handle($request, Closure $next)
    {
        if (! $this->checkIfUserCanViewPost($request)) {
            return redirect()->route('/');
        }

        return $next($request);
    }