-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Description
Laravel Version
12.29.0
PHP Version
8.2
Database Driver & Version
No response
Description
Before this update when calling route($routeName) it would return the last defined routename, now it returns the first defined routename.
Why this breaking change matters in our specific case
We use tenancy in our application and we have multiple routes with the same name. Previously when calling route($routeName) it would automatically return the tenant route when on the tenant, and the central route when not within tenant context, now it always returns the central route.
Please let me know if you require any additional information.
Steps To Reproduce
In your routes file:
Route::get('firstLink', [Test::class, 'test'])->name('routeTest');
Route::get('secondLink', [Test::class, 'test'])->name('routeTest');
Then on a random blade file:
Test link: {{route('routeTest')}}
On 12.28.1 and lower, this will return:
Test link: http://hackshield.local/secondLink
Now since 12.29.0 this returns:
Test link: http://hackshield.local/firstLink
Metadata
Metadata
Assignees
Labels
No labels