diff --git a/framework/core/src/Core/Notifications/Commands/ReadNotificationHandler.php b/framework/core/src/Core/Notifications/Commands/ReadNotificationHandler.php index 74038e030..1a84131aa 100644 --- a/framework/core/src/Core/Notifications/Commands/ReadNotificationHandler.php +++ b/framework/core/src/Core/Notifications/Commands/ReadNotificationHandler.php @@ -31,8 +31,12 @@ class ReadNotificationHandler $notification = Notification::where('user_id', $actor->id)->findOrFail($command->notificationId); - $notification->read(); - $notification->save(); + Notification::where([ + 'user_id' => $actor->id, + 'type' => $notification->type, + 'subject_id' => $notification->subject_id + ]) + ->update(['is_read' => true]); return $notification; }