mardi 29 septembre 2020

Use a one controller to handle multiple models

I designed a permission system to my laravel application, but i have a doubts about design controllers, i can make a one controller to manage role, module and relations, or the best method is create a single controller to each model?

Structure:

table permission (role,module relation)
table permission_role
table permission_module (route/controller it can be accessed)

Usage:

role [Developer] can access module [code]
role [Revisor] can access module [code, deploy]

Aucun commentaire:

Enregistrer un commentaire