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

blackshtef's avatar

Expanding Breeze with user status and/or roles

So, I'm using Breeze to handle user registration and login, but now I'm having some other thoughts. I would like for my users to be able to have some roles like admin, regular user, coordinator, and also a status like active user, pending activation, deactivated. Basically, one is account-related, and another is the role within the organization.

Should I just add two columns to the users table? And should I use IDs for that (1 - admin, 2 - user, 3 - coordinator) and having a separate table for roles, or should I just enter "admin"? I ask this because I'm not sure how to use that later; if I want to show something only to admin, would I be able to use if (User::auth()->role('admin')) or something else?

AFAIK, having a separate table for that stuff is the way to go, but I want to check with you people :)

0 likes
2 replies
LetherMade's avatar

Hi Blackshtef,

There are many ways how you can implement this. For roles and permissions, there is a very handy package bouncer (https://github.com/josephsilber/bouncer).

With this package, you can create your roles and permissions on the fly and use them in any way. You can of course create a column with roles etc. But if you want to build it flexible, then take a look how bouncer it does. You will learn a lot from it

Greetings, Wesley

Please or to participate in this conversation.