From e1f5337fe356ab9692c8c6a7f73ce7af40f39e3d Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Wed, 1 Mar 2023 22:30:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Notifications/Channels/WebChannel.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); + } } }