Gather the middleware for the given route.
public gatherRouteMiddleware ( Illuminate\Routing\Route $route ) : array | ||
$route | Illuminate\Routing\Route | |
return | array |
/** * Gather the route middleware for the given request. * * @param \Illuminate\Http\Request $request * @return array */ protected function gatherRouteMiddleware($request) { if ($route = $request->route()) { return $this->router->gatherRouteMiddleware($route); } return []; }
/** * Gather the route middlewares. * * @param \Illuminate\Routing\Route $route * * @return array */ public function gatherRouteMiddlewares($route) { if (method_exists($this->router, 'gatherRouteMiddleware')) { return $this->router->gatherRouteMiddleware($route); } return $this->router->gatherRouteMiddlewares($route); }
/** * Gather the middleware for the given route. * * @param \Illuminate\Routing\Route $route * * @return array * @static */ public static function gatherRouteMiddleware($route) { return \Illuminate\Routing\Router::gatherRouteMiddleware($route); }