M
M
mrSeller2018-03-13 14:23:26
Laravel
mrSeller, 2018-03-13 14:23:26

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:
5aa7b456d98a2426814022.png
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

1 answer(s)
N
Nurlan, 2018-03-13
@mrSeller

Documentation for the weak
Читаем с этого момента и немного дальше:5aa7beada6fc3093970727.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question