I'm having trouble designing this role (or permission) based application, when it comes to figuring out how to handle actions that differ per use role.
For instance, our controller is
App\ResourceController, and we will be editing the resource. There are 2 roles:
admin is allowed to edit every field of the resource, while the
user is restricted to some of them.
I'm struggling figuring out the best approach between implementing a single controller that will handle both cases, or routing the request to a different controller for the same resource (like
The issue with the single controller approach, is that it isn't just showing a different form (with restricted fields) based on role, but also validating different fields and more. The controller's body would pretty much look like a big
Is multiple controller the correct approach, or is there a different one using permissions instead of roles?