We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb8b4fc commit fb6eed2Copy full SHA for fb6eed2
src/Models/Rating.php
@@ -55,7 +55,7 @@ public function createRating(Model $reviewrateable, $data, Model $author)
55
$rating = new static();
56
$rating->fill(array_merge($data, [
57
'author_id' => $author->id,
58
- 'author_type' => get_class($author),
+ 'author_type' => $author->getMorphClass(),
59
]));
60
61
$reviewrateable->ratings()->save($rating);
0 commit comments