Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary warning about Route::fallback() being last #10026

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

dshafik
Copy link
Contributor

@dshafik dshafik commented Nov 13, 2024

This warning is unnecessary as the code will find the fallback route and put it at the end of the route list regardless as seen here in the source:

https://github.com/laravel/framework/blob/a296e813d041ddff000d856aa2f7ae1cd4d616b7/src/Illuminate/Routing/AbstractRouteCollection.php#L81-L85

L81-83 partitions the routes into the fallback and the rest of the routes, L85 merges the fallback partition into the regular routes partition, ensuring it is always last.

@taylorotwell taylorotwell merged commit 3ed0888 into laravel:11.x Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants