WARNING
You are using an old version of Laratrust. Consider updating to the latest version
# Installation
- In order to install Laratrust in your Laravel project, just run the
composer require
command from your terminal:
composer require "santigarcor/laratrust:5.2.*"
NOTE
Since this version requires Laravel >= 5.6 you don't need to do steps 2 and 3.
- Then in your
config/app.php
add the following to the providers array:
Laratrust\LaratrustServiceProvider::class,
- In the same
config/app.php
add the following to thealiases
array:
'Laratrust' => Laratrust\LaratrustFacade::class,
- Publish all the configuration files:
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
- The middleware are registered automatically as
role
,permission
andability
. If you want to customize or change them, please refer to the middleware configuration