Ejemplo n.º 1
0
 public function __invoke(RouteCollector $router)
 {
     $routes = $this->collection->all();
     foreach ($routes as $name => $route) {
         $router->addRoute($route->getMethods(), $route->getPath(), $name);
     }
 }
Ejemplo n.º 2
0
 public function withRoutes(CollectionInterface $routes)
 {
     $this->routes = array_merge($this->routes, $routes->all());
 }