Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit 2ddf715

Browse files
authored
Update CanComment.php
With these changes, there is no problem using the "Custom Polymorphic Types"
1 parent 278b246 commit 2ddf715

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CanComment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function comment($commentable, $commentText = '', $rate = 0)
2626
'rate' => ($commentable->getCanBeRated()) ? $rate : null,
2727
'approved' => ($commentable->mustBeApproved() && ! $this->isAdmin()) ? false : true,
2828
'commented_id' => $this->id,
29-
'commented_type' => get_class()
29+
'commented_type' => $this->getMorphClass()
3030
]);
3131

3232
$commentable->comments()->save($comment);

0 commit comments

Comments
 (0)