Skip to content

Commit 9ccd2a7

Browse files
authored
Merge pull request #27 from ShamarKellman/master
Fix unable to get reviewrateble item from rating model
2 parents 7467a79 + 3728ccd commit 9ccd2a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Rating.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Rating extends Model
3232
*/
3333
public function reviewrateable()
3434
{
35-
return $this->morphTo();
35+
return $this->morphTo(__FUNCTION__, 'reviewable_type', 'reviewable_id');
3636
}
3737

3838
/**

0 commit comments

Comments
 (0)