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