mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进关联
This commit is contained in:
@@ -251,7 +251,7 @@ class MorphTo extends Relation
|
||||
$this->parent->setAttr($morphType, get_class($model));
|
||||
$this->parent->save();
|
||||
|
||||
return $this->parent->data($this->relation, $model);
|
||||
return $this->parent->setAttr($this->relation, $model);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -268,7 +268,7 @@ class MorphTo extends Relation
|
||||
$this->parent->setAttr($morphType, null);
|
||||
$this->parent->save();
|
||||
|
||||
return $this->parent->data($this->relation, null);
|
||||
return $this->parent->setAttr($this->relation, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user