Skip to content

Commit

Permalink
fix array keys from cached routes (#42078) (#42124)
Browse files Browse the repository at this point in the history
Introduced by laravel/framework#35714.
Removed the slash to match the same array key as in
src/Illuminate/Routing/RouteCollection.php:60
  • Loading branch information
glamorous committed Apr 25, 2022
1 parent 90e6c1e commit a40b83b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions 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 a40b83b

Please sign in to comment.