Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ajax30's avatar

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:

  1. 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).

  2. 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!

0 likes
1 reply

Please or to participate in this conversation.