mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进模型数据验证
This commit is contained in:
@@ -202,10 +202,9 @@ class HasMany extends Relation
|
||||
*/
|
||||
public function save($data)
|
||||
{
|
||||
$model = $this->make();
|
||||
$data = array_merge($model->getData(), $data);
|
||||
$model = $this->make($data);
|
||||
|
||||
return $model->save($data) ? $model : false;
|
||||
return $model->save() ? $model : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user