Answers for "get users of specific role laravel role spatie"

PHP
2

get users of specific role laravel role spatie

$users = User::role('writer')->get();
Posted by: Guest on September-26-2020
1

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']);
Posted by: Guest on August-12-2021
1

laravel spatie asigne role

$role->givePermissionTo($permission);
$permission->assignRole($role);
Posted by: Guest on August-12-2021

Code answers related to "get users of specific role laravel role spatie"

Browse Popular Code Answers by Language