setRoutes() публичный Метод

Set the route collection.
public setRoutes ( RouteCollection $routes )
$routes RouteCollection
Пример #1
0
 /**
  * Perform an API request to a named route.
  *
  * @param  string  $name
  * @param  string|array  $routeParameters
  * @param  string|array  $parameters
  * @return mixed
  */
 public function route($name, $routeParameters = [], $parameters = [])
 {
     $version = $this->version ?: $this->router->getDefaultVersion();
     $route = $this->router->getApiRouteCollection($version)->getByName($name);
     $this->url->setRoutes($this->router->getApiRouteCollection($version));
     $uri = ltrim($this->url->route($name, $routeParameters, false), '/');
     return $this->queueRequest($route->methods()[0], $uri, $parameters);
 }
Пример #2
0
 /**
  * Set the route collection.
  *
  * @param \Illuminate\Routing\RouteCollection $routes
  * @return $this 
  * @static 
  */
 public static function setRoutes($routes)
 {
     return \Illuminate\Routing\UrlGenerator::setRoutes($routes);
 }