I have a user table that contains a colum "role"
i would like to exclude the ones that contains a certain role by Eloquent
Does any one knows a solution for this ?
>Solution :
To answer your original comment
User::query()->whereNotIn('role', 'blabla')->get();
To answer the second edit of the comment:
User::query()->whereNotIn('role', [
'Admin', 'responsable', 'magasinier', 'demandeur'
])->get();
To answer the third edit of the comment:
User::query()->whereNotIn('role', 'demandeur')->get();