feat(broadcast): tambahkan developer ke dalam daftar push notifikasi
This commit is contained in:
parent
c650d8d58f
commit
b7c32d2ffb
@ -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(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user