Dapatkan Pengguna dari Peran Khusus Laravel Peran 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()