you may consider policy or gate
some lessons that may give you a clear pictures: https://laracasts.com/search?q=acl
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey everyone :)
I created a role permissions system where I have in database all of my features (basically those are controllers methods). I have a users table bound to roles table, and I'll bind the roles to the methods.
I was wondering if there is any need of checking if the role has right to access the method that handles saving data.
Exemple : In a PostController, in the "create" method (method that loads the view containing the form) I check If the user has the role "Post creator". Should I also do the same check in the store method (the method that save the post) ?
Don't really know how @crsf token works behind the scenes, and I was wondering if there is a way to post data to the saving methods without having access to the methods that load the views.
Please or to participate in this conversation.