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.0.*"

NOTE

If you are using Laravel 5.5 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
Last Updated: 8/12/2018, 10:41:55 PM