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

chaibialaa's avatar

Dynamic Roles

Hello there,

I've gone through many packages online, but still can't find one that handle (accept) dynamic permissions and roles. In my web app, admins should be able to add roles, assign them to users, and select specific permissions that can be dynamic or static as we won't go to generating pages but just giving permissions for example : Role('FROM DB where Role="role") => return true : DisplayContent Permission : true, DisplayEditContent Permission : False

0 likes
3 replies
jlrdw's avatar

One extra field in user table could handle it, maybe a field called roletype that's a true or false field.

chaibialaa's avatar

I dont think you got my point .. in every role mnager out there the roles are set as hardcoded, i need that the system retrieve the roles from database so that my admin users can set roles, add roles, remove roles from the front end.

jlrdw's avatar

All can be done in Laravel, with roles, and a well crafted if statement.

Please or to participate in this conversation.