mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
model类增加removeRelation方法
This commit is contained in:
@@ -838,6 +838,17 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
return json_encode($this->toArray(), $options);
|
return json_encode($this->toArray(), $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除当前模型的关联属性
|
||||||
|
* @access public
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function removeRelation()
|
||||||
|
{
|
||||||
|
$this->relation = [];
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换当前模型数据集为数据集对象
|
* 转换当前模型数据集为数据集对象
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
Reference in New Issue
Block a user