@ajax30 this is what you need: https://laracasts.com/series/laravel-6-from-scratch/episodes/54
Roles and Permissions Without a Package
Hi Laravelers!
I have been working on a CMS, with Laravel 8. I have called it BraveCMS.
I am planning to make a user roles and permissions feature. I have not decided yet on either of the following courses of action regarding this feature:
-
Add a role_id column to the users table and have a one-to-one relationship between users and roles and then add a permissions table that has a one-to-many relationship with the roles table (one role has one or more permissions).
-
Go the long way and have a many-to-many relationship between users and roles and another (many-to-many relationship) between roles and permissions.
Which of the courses you know about would help me make the best decision and teach me how to implement the assigning roles & permissions via the UI of the CMS?
What would your choice be?
Is there a third, superior choice?
Thank you!
Please or to participate in this conversation.