Fix deprecation warning

This commit is contained in:
Di
2024-10-11 18:44:00 +02:00
parent 7c598d62a8
commit 1ae27fe5e3
+1 -1
View File
@@ -42,7 +42,7 @@ trait HasComments
'is_approved' => ($user instanceof Commentator) ? ! $user->needsCommentApproval($this) : false, 'is_approved' => ($user instanceof Commentator) ? ! $user->needsCommentApproval($this) : false,
'user_id' => is_null($user) ? null : $user->getKey(), 'user_id' => is_null($user) ? null : $user->getKey(),
'commentable_id' => $this->getKey(), 'commentable_id' => $this->getKey(),
'commentable_type' => get_class(), 'commentable_type' => get_class($this),
]); ]);
return $this->comments()->save($comment); return $this->comments()->save($comment);