- In order to install Laratrust in your Laravel project, just run the
composer requirecommand from your terminal:
composer require "santigarcor/laratrust:5.1.*"
If you are using Laravel >=5.5 you don't need to do steps 2 and 3.
- Then in your
config/app.phpadd the following to the providers array:
- In the same
config/app.phpadd the following to the
'Laratrust' => Laratrust\LaratrustFacade::class,
- Publish all the configuration files:
php artisan vendor:publish --tag="laratrust"
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