diff --git a/app/Notifications/Channels/WebChannel.php b/app/Notifications/Channels/WebChannel.php index 31532b6..aad70ca 100644 --- a/app/Notifications/Channels/WebChannel.php +++ b/app/Notifications/Channels/WebChannel.php @@ -26,6 +26,8 @@ public function send(mixed $notifiable, Notification $notification): void $user = (new User)->find($user_id); - broadcast(new Users($user, $data['event'], $data)); + if ($user) { + broadcast(new Users($user, $data['event'], $data)); + } } }