Skip to content

Commit 3728ccd

Browse files
committed
Fix unable to get reviewrateble item from rating model
1 parent aaea8e7 commit 3728ccd

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
@@ -21,7 +21,7 @@ class Rating extends Model
2121
*/
2222
public function reviewrateable()
2323
{
24-
return $this->morphTo();
24+
return $this->morphTo(__FUNCTION__, 'reviewable_type', 'reviewable_id');
2525
}
2626

2727
/**

0 commit comments

Comments
 (0)