Components\Middleware\CSRF::execute PHP Метод

execute() публичный Метод

public execute ( $request, callable $next )
$next callable
    public function execute($request, callable $next)
    {
        if ($request->isPost()) {
            if (security()->checkToken() === false) {
                # throw exception or redirect the user
                # or render a content using
                # View::take(<resources.view>);exit;
                throw new AccessNotAllowedException('Token mismatch, what are you doing?');
            }
        }
        return $next($request);
    }