Skip to content

Commit

Permalink
fix array keys from cached routes
Browse files Browse the repository at this point in the history
Introduced by laravel#35714.
Removed the slash to match the same array key as in
src/Illuminate/Routing/RouteCollection.php:60
  • Loading branch information
glamorous committed Apr 21, 2022
1 parent f0d10fd commit 36c59ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Illuminate/Routing/CompiledRouteCollection.php
Expand Up @@ -252,11 +252,7 @@ public function getRoutesByMethod()
})
->map(function (Collection $routes) {
return $routes->mapWithKeys(function (Route $route) {
if ($domain = $route->getDomain()) {
return [$domain.'/'.$route->uri => $route];
}

return [$route->uri => $route];
return [$route->getDomain().$route->uri => $route];
})->all();
})
->all();
Expand Down

0 comments on commit 36c59ff

Please sign in to comment.