From b7c32d2ffb84037e8e1b9d8912a25f20da71065c Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Thu, 18 Dec 2025 15:06:29 +0700 Subject: [PATCH] feat(broadcast): tambahkan developer ke dalam daftar push notifikasi --- app/Livewire/Studio/Information/Broadcast.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Studio/Information/Broadcast.php b/app/Livewire/Studio/Information/Broadcast.php index 26039ba..1db3566 100644 --- a/app/Livewire/Studio/Information/Broadcast.php +++ b/app/Livewire/Studio/Information/Broadcast.php @@ -44,7 +44,16 @@ public function create(): void $result = $this->form->store(); - $userIds = User::role(array_map('intval', $result['audience_ids']))->pluck('id')->toArray(); + $audienceUserIds = User::role(array_map('intval', $result['audience_ids']))->pluck('id'); + + $developerUserIds = User::role('Developer') + ->pluck('id'); + + $userIds = $audienceUserIds + ->merge($developerUserIds) + ->unique() + ->values() + ->toArray(); StorePushNotification::dispatch( PushNotification::whereIn('user_id', $userIds)->get(),