public function getMiddleware() : array
    {
        if (!$this->providesMiddleware()) {
            return [];
        }

        $allControllerMiddleware = array_filter(
            $this->getController()->getControllerMiddleware(),
            function (ControllerMiddleware $middleware) {
                return !$middleware->excludedForMethod($this->controllerMethod);
            }
        );

        return array_map(
            function ($controllerMiddleware) {
                return $controllerMiddleware->middleware();
            },
            $allControllerMiddleware
        );
    }
public function getMiddleware() : array
    {
        if (!$this->providesMiddleware()) {
            return [];
        }

        $allControllerMiddleware = array_filter(
            $this->getController()->getControllerMiddleware(),
            function (ControllerMiddleware $middleware) {
                return !$middleware->excludedForMethod($this->controllerMethod);
            }
        );

        return array_map(
            function ($controllerMiddleware) {
                return $controllerMiddleware->middleware();
            },
            $allControllerMiddleware
        );
    }
public function getMiddleware ( ) : array { if ( ! $ this -> providesMiddleware ( ) ) { return [ ] ; } $ allControllerMiddleware = array_filter ( $ this -> getController ( ) -> getControllerMiddleware ( ) , function ( ControllerMiddleware $ middleware ) { return ! $ middleware -> excludedForMethod ( $ this -> controllerMethod ) ; } ) ; return array_map ( function ( $ controllerMiddleware ) { return $ controllerMiddleware -> middleware ( ) ; } , $ allControllerMiddleware ) ; }
Get an array of Middleware

@return array
Get an array of Middleware