Skip to content

Commit

Permalink
Update HasRelations::morphInstanceTo() (#18058)
Browse files Browse the repository at this point in the history
I changed this line so that the static method getActualClassNameForMorph can be overridden.
In my case, the morph relationship is idetified by integers, so I rewrote the static method getActualClassNameForMorph.
  • Loading branch information
masterwto authored and taylorotwell committed Feb 22, 2017
1 parent 5ffe7f2 commit 2f4135d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected function morphEagerTo($name, $type, $id)
protected function morphInstanceTo($target, $name, $type, $id)
{
$instance = $this->newRelatedInstance(
Model::getActualClassNameForMorph($target)
static::getActualClassNameForMorph($target)
);

return new MorphTo(
Expand Down

0 comments on commit 2f4135d

Please sign in to comment.