Returns all routes in this collection and its children.
array An array of routes
public function all() {
$routes = array();
foreach ($this->routes as $name => $route) {
if ($route instanceof RouteCollection) {
$routes = array_merge($routes, $route
->all());
}
else {
$routes[$name] = $route;
}
}
return $routes;
}