protected function gatherAppMiddleware(Kernel $kernel)
    {
        $reflection = new ReflectionClass($kernel);

        $property = $reflection->getProperty('middleware');
        $property->setAccessible(true);

        $middleware = $property->getValue($kernel);

        if ($this->app['config']['alexa.skipCsrfCheck']) {
            $middleware = $this->unsetCsrfMiddleware($middleware);
        }

        return $middleware;
    }
protected function gatherAppMiddleware(Kernel $kernel)
    {
        $reflection = new ReflectionClass($kernel);

        $property = $reflection->getProperty('middleware');
        $property->setAccessible(true);

        $middleware = $property->getValue($kernel);

        if ($this->app['config']['alexa.skipCsrfCheck']) {
            $middleware = $this->unsetCsrfMiddleware($middleware);
        }

        return $middleware;
    }
protected function gatherAppMiddleware ( Kernel $ kernel ) { $ reflection = new ReflectionClass ( $ kernel ) ; $ property = $ reflection -> getProperty ( 'middleware' ) ; $ property -> setAccessible ( true ) ; $ middleware = $ property -> getValue ( $ kernel ) ; if ( $ this -> app [ 'config' ] [ 'alexa.skipCsrfCheck' ] ) { $ middleware = $ this -> unsetCsrfMiddleware ( $ middleware ) ; } return $ middleware ; }
Gather the application middleware besides this one so that we can send
our request through them, exactly how the developer wanted.

@param \Illuminate\Contracts\Http\Kernel $kernel

@return array
Gather the application middleware besides this one so that we can send our request through them exactly how the developer wanted .