-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
Description
Hi,
Decide to give you package a run as it seems to fit the bill :)
/*$role = new \App\Modules\Base\Models\Role();
$roleAdmin = $role->create([
'name' => 'Administrator',
'slug' => 'administrator',
'description'=>'manage administration privileges'
]);*/
$user = \App\User::find(1);
// assign role by just a slug
$user->assignRole('administrator');
dd($user);
The assignRole fails with...
InvalidArgumentException in HasRole.php line 158: Specified role id does not exists.
Any ideas @kodeine ?
Thanks.