From d01f7c885755d4f425fa0a77ea4119bceb9aee6f Mon Sep 17 00:00:00 2001 From: kushan2 Date: Wed, 26 Apr 2023 12:13:34 +0530 Subject: [PATCH] Issue when participation is null --- src/Models/Message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/Message.php b/src/Models/Message.php index 4498b7a..2cc792d 100644 --- a/src/Models/Message.php +++ b/src/Models/Message.php @@ -48,7 +48,7 @@ public function participation() public function getSenderAttribute() { - $participantModel = $this->participation->messageable; + $participantModel = $this->participation?->messageable; if (!isset($participantModel)) { return null;