WARNING

You are using an old version of Laratrust. Consider updating to the latest version

# Installation

  1. 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.

  1. Then in your config/app.php add the following to the providers array:
Laratrust\LaratrustServiceProvider::class,
  1. In the same config/app.php add the following to the aliases array:
'Laratrust'   => Laratrust\LaratrustFacade::class,
  1. 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
  1. The middleware are registered automatically as role, permission and ability . If you want to customize or change them, please refer to the middleware configuration