managers()->toUsers()->not($this); if (!$recipients) return; foreach ($recipients as $otherUser) { try { $notifications = $otherUser->notifications()->isNotEmpty() ? Yaml::decode($otherUser->notifications()->value()) : []; $notifications[] = $notificationData; $otherUser->update([ 'notifications' => $notifications ]); } catch (\Throwable $th) { throw new Exception("Error updating notifications: " . $th->getMessage() . ' line ' . $th->getLine(), 1); } } };