protected function getFirstNamedRoute(RouteCollection $routeCollection, $name) {
foreach ($routeCollection as $key => $route) {
if ($route instanceof RouteCollection) {
return $this
->getFirstNamedRoute($route, $name);
}
if ($name === $key) {
return $route;
}
}
}