Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
17
vendor/symfony/routing/RouteCollection.php
vendored
17
vendor/symfony/routing/RouteCollection.php
vendored
@@ -153,6 +153,23 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a prefix to the name of all the routes within in the collection.
|
||||
*/
|
||||
public function addNamePrefix(string $prefix)
|
||||
{
|
||||
$prefixedRoutes = array();
|
||||
|
||||
foreach ($this->routes as $name => $route) {
|
||||
$prefixedRoutes[$prefix.$name] = $route;
|
||||
if (null !== $name = $route->getDefault('_canonical_route')) {
|
||||
$route->setDefault('_canonical_route', $prefix.$name);
|
||||
}
|
||||
}
|
||||
|
||||
$this->routes = $prefixedRoutes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the host pattern on all routes.
|
||||
*
|
||||
|
Reference in New Issue
Block a user