Trying to do assignRole()
to many users, but it show me Call to undefined method Illuminate\Database\Query\Builder::assignRole(). Is this spatie laravel bug?
$get_username = \App\Applicant::select('username')->whereIn('id', $ids);
$updateUser = \App\User::whereIn('username', $get_username);
$updateUser->assignRole('Applicant');
$updateUser->save();
Any solution for bulk assignRole()
in this case?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire