Skip to content

Commit d1cc7a9

Browse files
authored
Merge pull request #15 from Donkfather/develop
use getMorphClass
2 parents bb8b4fc + fb6eed2 commit d1cc7a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Rating.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function createRating(Model $reviewrateable, $data, Model $author)
5555
$rating = new static();
5656
$rating->fill(array_merge($data, [
5757
'author_id' => $author->id,
58-
'author_type' => get_class($author),
58+
'author_type' => $author->getMorphClass(),
5959
]));
6060

6161
$reviewrateable->ratings()->save($rating);

0 commit comments

Comments
 (0)