Right now if laravel does that, it wouldn't help much since laravel terminates the request if it fails at middleware level. I mean it does not fallthrough to a different route. Additionally its best that each route is self documenting and unique per endpoint otherwise you'll have bugs to deal with on the long run.
Perhaps the issue you're facing can be solved another way and would be:
The benefit for above is
Or
And then in the controller you can make a check to see if its admin. I would definitely recommend the first one unless you must do it this way.
hdyadav liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community