gatherRouteMiddleware() public method

Gather the middleware for the given route.
public gatherRouteMiddleware ( Illuminate\Routing\Route $route ) : array
$route Illuminate\Routing\Route
return array
Example #1
0
 /**
  * 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 [];
 }
Example #2
0
 /**
  * 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);
 }
Example #3
0
 /**
  * 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);
 }