From a40b83b49a73d00db815d09b222ab7917427c663 Mon Sep 17 00:00:00 2001 From: Jonas De Smet Date: Mon, 25 Apr 2022 16:39:29 +0200 Subject: [PATCH] fix array keys from cached routes (#42078) (#42124) Introduced by https://github.com/laravel/framework/pull/35714. Removed the slash to match the same array key as in src/Illuminate/Routing/RouteCollection.php:60 --- CompiledRouteCollection.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CompiledRouteCollection.php b/CompiledRouteCollection.php index 095d3a9..bb6d1e2 100644 --- a/CompiledRouteCollection.php +++ b/CompiledRouteCollection.php @@ -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();