Obtener usuarios de rol específico de Laravel spatie
$users = User::role('writer')->get();
Lokesh003
$users = User::role('writer')->get();
User::query()->whereHas("roles", function($q){ $q->whereNotIn("name", ["superadmin"]); })