Zdobądź użytkowników określonej roli laravel spatie
$users = User::role('writer')->get();
Lokesh003
$users = User::role('writer')->get();
User::query()->whereHas("roles", function($q){ $q->whereNotIn("name", ["superadmin"]); })
User::query()->whereHas("roles", function($q){ $q->whereNotIn("name", ["superadmin"]); })->get()