This commit is contained in:
thinkphp
2018-01-24 19:19:17 +08:00
parent 554817c045
commit b72caee28b

View File

@@ -52,7 +52,7 @@ class MorphTo extends Relation
{ {
$morphType = $this->morphType; $morphType = $this->morphType;
$model = $this->parseModel($this->parent->$morphType); $model = $this->parseModel($this->parent->$morphType);
return (new $model)->db()->getModel(); return (new $model);
} }
/** /**