Answer the question
In order to leave comments, you need to log in
How to configure middleware for zizaco/entrust?
For roles, I use the Zizaco\Entrust package.
In the routes, I prescribe the middleware "'middleware' => ['role:admin']" and, if the user does not have such a role, Laravel simply gives me a miserable error:
How (and most importantly, where?) to configure intermediary so that, in the case of the absence of a role, there is a redirect to the route I need, or at least just a 404?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question