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;