diff --git a/app/Bus/Handlers/Events/Component/SendComponentUpdateEmailNotificationHandler.php b/app/Bus/Handlers/Events/Component/SendComponentUpdateEmailNotificationHandler.php index 84eb6643..aed7ce1a 100644 --- a/app/Bus/Handlers/Events/Component/SendComponentUpdateEmailNotificationHandler.php +++ b/app/Bus/Handlers/Events/Component/SendComponentUpdateEmailNotificationHandler.php @@ -56,7 +56,7 @@ class SendComponentUpdateEmailNotificationHandler // First notify all global subscribers. $globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get(); - $globalSubscribers->map(function ($subscriber) use ($component, $event) { + $globalSubscribers->each(function ($subscriber) use ($component, $event) { $subscriber->notify(new ComponentStatusChangedNotification($component, $event->new_status)); }); @@ -71,7 +71,7 @@ class SendComponentUpdateEmailNotificationHandler return in_array($subscriber->id, $notified); }); - $componentSubscribers->map(function ($subscriber) use ($component, $event) { + $componentSubscribers->each(function ($subscriber) use ($component, $event) { $subscriber->notify(new ComponentStatusChangedNotification($component, $event->new_status)); }); } diff --git a/app/Bus/Handlers/Events/Incident/SendIncidentEmailNotificationHandler.php b/app/Bus/Handlers/Events/Incident/SendIncidentEmailNotificationHandler.php index b642bf1b..82bddcda 100644 --- a/app/Bus/Handlers/Events/Incident/SendIncidentEmailNotificationHandler.php +++ b/app/Bus/Handlers/Events/Incident/SendIncidentEmailNotificationHandler.php @@ -59,7 +59,7 @@ class SendIncidentEmailNotificationHandler // First notify all global subscribers. $globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get(); - $globalSubscribers->map(function ($subscriber) use ($incident) { + $globalSubscribers->each(function ($subscriber) use ($incident) { $subscriber->notify(new NewIncidentNotification($incident)); }); @@ -76,7 +76,7 @@ class SendIncidentEmailNotificationHandler ->get() ->reject(function ($subscriber) use ($notified) { return in_array($subscriber->id, $notified); - })->map(function ($subscriber) use ($incident) { + })->each(function ($subscriber) use ($incident) { $subscriber->notify(new NewIncidentNotification($incident)); }); } diff --git a/app/Bus/Handlers/Events/IncidentUpdate/SendIncidentUpdateEmailNotificationHandler.php b/app/Bus/Handlers/Events/IncidentUpdate/SendIncidentUpdateEmailNotificationHandler.php index 5a5090ad..86ed8147 100644 --- a/app/Bus/Handlers/Events/IncidentUpdate/SendIncidentUpdateEmailNotificationHandler.php +++ b/app/Bus/Handlers/Events/IncidentUpdate/SendIncidentUpdateEmailNotificationHandler.php @@ -56,7 +56,7 @@ class SendIncidentUpdateEmailNotificationHandler // First notify all global subscribers. $globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get(); - $globalSubscribers->map(function ($subscriber) use ($update) { + $globalSubscribers->each(function ($subscriber) use ($update) { $subscriber->notify(new IncidentUpdatedNotification($update)); }); @@ -73,7 +73,7 @@ class SendIncidentUpdateEmailNotificationHandler ->get() ->reject(function ($subscriber) use ($notified) { return in_array($subscriber->id, $notified); - })->map(function ($subscriber) use ($incident) { + })->each(function ($subscriber) use ($incident) { $subscriber->notify(new IncidentUpdatedNotification($incident)); }); } diff --git a/app/Bus/Handlers/Events/Schedule/SendScheduleEmailNotificationHandler.php b/app/Bus/Handlers/Events/Schedule/SendScheduleEmailNotificationHandler.php index 6a50b52a..11e6b377 100644 --- a/app/Bus/Handlers/Events/Schedule/SendScheduleEmailNotificationHandler.php +++ b/app/Bus/Handlers/Events/Schedule/SendScheduleEmailNotificationHandler.php @@ -53,7 +53,7 @@ class SendScheduleEmailNotificationHandler $schedule = $event->schedule; // First notify all global subscribers. - $globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get()->map(function ($subscriber) use ($schedule) { + $globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get()->each(function ($subscriber) use ($schedule) { $subscriber->notify(new NewScheduleNotification($schedule)); }); }