tipe = $tipe; $this->judul = $judul; $this->pesan = $pesan; $this->data = $data; } /** * Execute the job. */ public function handle(NotifikasiService $notifikasiService): void { $users = User::where('status_aktif', 1) ->whereDoesntHave('roles', function ($q) { $q->whereIn('nama_role', ['super_admin']); }) ->pluck('id'); foreach ($users as $idUser) { $notifikasiService->kirim($idUser, $this->tipe, $this->judul, $this->pesan, $this->data); } } }