how get role of user in laravel spatie

109

laravel spatie asigne role -

$user->assignRole('writer');

// You can also assign multiple roles at once
$user->assignRole('writer', 'admin');
// or as an array
$user->assignRole(['writer', 'admin']);

laravel spatie asigne role -

$role->syncPermissions($permissions);
$permission->syncRoles($roles);

Comments

Submit
0 Comments