protected function addRequestMiddlewareToBeginning(ReflectionClass $reflection)
    {
        $property = $reflection->getProperty('middleware');
        $property->setAccessible(true);

        $middleware = $property->getValue($this->app);

        array_unshift($middleware, 'Develpr\AlexaApp\Http\Middleware\Request');

        $property->setValue($this->app, $middleware);
        $property->setAccessible(false);
    }
protected function addRequestMiddlewareToBeginning(ReflectionClass $reflection)
    {
        $property = $reflection->getProperty('middleware');
        $property->setAccessible(true);

        $middleware = $property->getValue($this->app);

        array_unshift($middleware, 'Develpr\AlexaApp\Http\Middleware\Request');

        $property->setValue($this->app, $middleware);
        $property->setAccessible(false);
    }
protected function addRequestMiddlewareToBeginning ( ReflectionClass $ reflection ) { $ property = $ reflection -> getProperty ( 'middleware' ) ; $ property -> setAccessible ( true ) ; $ middleware = $ property -> getValue ( $ this -> app ) ; array_unshift ( $ middleware , 'Develpr\AlexaApp\Http\Middleware\Request' ) ; $ property -> setValue ( $ this -> app , $ middleware ) ; $ property -> setAccessible ( false ) ; }
Add the request middleware to the beginning of the middleware stack on the
Lumen application instance.

@param \ReflectionClass $reflection
Add the request middleware to the beginning of the middleware stack on the Lumen application instance .