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.
::: warning WARNING You are using an old version of Laratrust. Consider updating to the latest version :::
composer require command from your terminal:composer require "santigarcor/laratrust:5.2.*"
::: tip NOTE Since this version requires Laravel >= 5.6 you don't need to do steps 2 and 3. :::
config/app.php add the following to the providers array:Laratrust\LaratrustServiceProvider::class,
config/app.php add the following to the aliases array:'Laratrust' => Laratrust\LaratrustFacade::class,
php artisan vendor:publish --tag="laratrust"
::: warning If this command did not publish any files, chances are, the Laratrust service provider hasn't been registered. Try clearing your configuration cache
php artisan config:clear
:::
role, permission and ability . If you want to customize or change them, please refer to the middleware configurationHow can I help you explore Laravel packages today?