Ability to add multiple fallback routes #53307
Unanswered
indykoning
asked this question in
Ideas
Replies: 1 comment 1 reply
-
framework/src/Illuminate/Routing/Router.php Lines 242 to 249 in 5527e72
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Laravel has a way to add fallback routes to the router.
Which works great as a catch all, so code can determine wether the route matches something.
(e.g. a redirect table, dynamic routes/pages)
Now say you've installed something like Statamic which works using a fallback route.
And you want to use a fallback route in your own project as well.
One of the two will never get fired, while the other causes a 404 to occur.
My idea is to use the Route::isFallback to try the next route in case a route with
isFallback === true
returns a 404.This way you can still use a fallback route without losing the ability to use packages like Statamic.
If people agree i am willing to create a PR to enable this feature.
Beta Was this translation helpful? Give feedback.
All reactions