-
Notifications
You must be signed in to change notification settings - Fork 28
[Proposal] Route::fallback(); #653
Comments
Isn't that basically the same as |
Almost yes. The problem with that is that routes and route files aren't always so straight-forward. For example I'm working on a multi-tenant application where there are common routes and there are tenant-specific routes. And then I also have vendor packages which register routes. Because of that structure it's risky to put So when I write |
Ah, I see now. Cool. |
This is a nice idea - though I don't think it's needed for every resource. This could solve #413 |
Check laravel/framework#21234 |
Would it be possible to have a |
Basically it would be nice to be able to define a fallback-route like so:
Which would match any
GET
route that doesn't match any of the other routes. There can only be one fallback route and if more are defined then the last one always overwrites the previous one. Maybe, because of that, it would also be nice to be able to check whether one was already defined:If more people like this then I'm willing to write a PR.
edit
Maybe it would actually be nice to have fallbacks for every http method. In that case in might be nice to be able to write this:
Or not?
The text was updated successfully, but these errors were encountered: