Handle roles and permissions in your Laravel application
::class
syntax in the config file by default.This release enables the possibility to add restriction to roles in the admin panel. Now you can define which roles shouldn't be editable, removable or deletable in the admin panel.
In order to use this feature if you installed the 6.0 version you simply have to add this to the panel
section in your config/laratrust.php
file:
/*
|--------------------------------------------------------------------------
| Add restriction to roles in the panel
|--------------------------------------------------------------------------
|
| Configure which roles can not be editable, deletable and removable.
| To add a role to the restriction, use name of the role here.
|
*/
'roles_restrictions' => [
// The user won't be able to remove roles already assigend to users.
'not_removable' => [],
// The user won't be able to edit the role and the permissions assigned.
'not_editable' => [],
// The user won't be able to delete the role.
'not_deletable' => [],
],