Answer the question
In order to leave comments, you need to log in
Guards vs Roles in laravel?
What is the best way to separate roles? Guards or just create a role_id in the table?
Answer the question
In order to leave comments, you need to log in
How does one interfere with the other? In the general case, guards and policies allow you to use a bunch of helpers (in templates, in controllers, including resource ones, in middleware) and where they will get data for this from there (a field in the user model, a field in a separate role table, a field in table of the application object model, some combination of this (for example, author + moderator)) - all this is already described by the code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question