protected function getMiddleware(ResourcePath $path)
    {
        $classMiddleware = $this->getClassMiddlewareForPath($path)->all();

        return array_merge($classMiddleware, array_get($this->middleware, $path->method, []));
    }
protected function getMiddleware(ResourcePath $path)
    {
        $classMiddleware = $this->getClassMiddlewareForPath($path)->all();

        return array_merge($classMiddleware, array_get($this->middleware, $path->method, []));
    }
protected function getMiddleware ( ResourcePath $ path ) { $ classMiddleware = $ this -> getClassMiddlewareForPath ( $ path ) -> all ( ) ; return array_merge ( $ classMiddleware , array_get ( $ this -> middleware , $ path -> method , [ ] ) ) ; }
Get all of the middleware for the given path.

This will also merge in any of the middleware applied at the route level.

@param ResourcePath $path

@return array
Get all of the middleware for the given path .