After Installation

Configuration Files

Set the proper values in the config/auth.php. These values will be used by laratrust to refer to the user model.

You can also publish the configuration for this package to further customize table names and model namespaces.

Use php artisan vendor:publish, the laratrust.php and laratrust_seeder.php files will be created in your app/config directory.


Now generate the Laratrust migration:

php artisan laratrust:migration

It will generate the <timestamp>_laratrust_setup_tables.php migration. You may now run it with the artisan migrate command:

php artisan migrate

After the migration, four new tables will be present:

  • roles — stores role records
  • permissions — stores permission records
  • role_user — stores many-to-many relations between roles and users
  • permission_role — stores many-to-many relations between roles and permissions