laravel spatie assign role to user by id code example Example: get users of specific role laravel role spatie $users = User::role('writer')->get();