Laravel\Lumen\Concerns\RoutesRequests::callLumenControllerWithMiddleware PHP Method

callLumenControllerWithMiddleware() protected method

Send the request through a set of controller middleware.
protected callLumenControllerWithMiddleware ( mixed $instance, string $method, array $routeInfo, array $middleware ) : mixed
$instance mixed
$method string
$routeInfo array
$middleware array
return mixed
    protected function callLumenControllerWithMiddleware($instance, $method, $routeInfo, $middleware)
    {
        $middleware = $this->gatherMiddlewareClassNames($middleware);
        return $this->sendThroughPipeline($middleware, function () use($instance, $method, $routeInfo) {
            return $this->callControllerCallable([$instance, $method], $routeInfo[2]);
        });
    }