gatherRouteMiddlewares() public method

Gather the middleware for the given route.
public gatherRouteMiddlewares ( mixed $route ) : array
$route mixed
return array
示例#1
0
 /**
  * Gather the middlewares for the route.
  *
  * @param \Dingo\Api\Http\Request $request
  *
  * @return array
  */
 protected function gatherRouteMiddlewares($request)
 {
     if ($route = $request->route()) {
         return $this->router->gatherRouteMiddlewares($route);
     }
     return [];
 }