santigarcor/laratrust
Laratrust adds role and permission management to Laravel with support for multiple user models, teams, guards, caching, events, middleware, gates/policies, and an optional admin panel for managing roles and permissions.
Now generate the Laratrust migration
php artisan laratrust:migration
It will generate the <timestamp>_laratrust_setup_tables.php migration.
You may now run it with the artisan migrate command:
php artisan migrate
After the migration, five (or six if you use teams feature) new tables will be present:
roles — stores role records.permissions — stores permission records.teams — stores teams records (Only if you use the teams feature).role_user — stores polymorphic relations between roles and users.permission_role — stores many-to-many relations between roles and permissions.permission_user — stores polymorphic relations between users and permissions.How can I help you explore Laravel packages today?