mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正MorphTo关联
This commit is contained in:
@@ -248,7 +248,7 @@ class MorphTo extends Relation
|
|||||||
$pk = $model->getPk();
|
$pk = $model->getPk();
|
||||||
|
|
||||||
$this->parent->setAttr($morphKey, $model->$pk);
|
$this->parent->setAttr($morphKey, $model->$pk);
|
||||||
$this->parent->setAttr($morphType, get_class($model));
|
$this->parent->setAttr($morphType, basename(get_class($model)));
|
||||||
$this->parent->save();
|
$this->parent->save();
|
||||||
|
|
||||||
return $this->parent->setRelation($this->relation, $model);
|
return $this->parent->setRelation($this->relation, $model);
|
||||||
|
|||||||
Reference in New Issue
Block a user