mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进关联的save方法
This commit is contained in:
@@ -245,7 +245,8 @@ class MorphMany extends Relation
|
||||
*/
|
||||
public function save($data)
|
||||
{
|
||||
$model = $this->make($data);
|
||||
$model = $this->make();
|
||||
$data = array_merge($model->getData(), $data);
|
||||
|
||||
return $model->save($data) ? $model : false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user