Answer the question
In order to leave comments, you need to log in
Why do we need gates in laravel if there is a middleware?
Hello.
I can not understand in any way what is the point of using gates in laravel. Read that gates use for check of roles and authorization.
Isn't it more convenient to use middleware ?
You create a middleware, add a group with this middleware to the router, upload pages there that need verification for authorization and roles.
What did I miss?
Thank you.
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