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

NikhilLVL's avatar

Roles and Permissions without package or table

Hi, I am working in an application which have users table. With the same(users) I've created the default auth and set it as middleware to specific routes. I need to further assign roles and permissions to different users(like one can do anything, another one can only create and update - no delete). I need this to be done without any external packages nor adding extra tables or even extra fields in users table. Is there any method to make it?

0 likes
4 replies
DhPandya's avatar

@nikhillvl

without any external packages nor adding extra tables or even extra fields in users table

This is like you want to code but don't want to write the code. Without creating a proper table structure how can you maintain user-wise roles?

1 like
NikhilLVL's avatar

Can the same be done by adding one table more, fields can be added in the users table?

Thunderson's avatar

@NikhilLVL no way !! can you explain to us the constraint that prevents you from adding other tables?

Please or to participate in this conversation.