mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进多对多的数据更新
This commit is contained in:
@@ -93,7 +93,7 @@ class BelongsToMany extends Relation
|
||||
}
|
||||
}
|
||||
}
|
||||
$model->pivot = $this->newPivot($pivot);
|
||||
$model->setRelation('pivot', $this->newPivot($pivot));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ class BelongsToMany extends Relation
|
||||
}
|
||||
}
|
||||
}
|
||||
$set->pivot = $this->newPivot($pivot);
|
||||
$set->setRelation('pivot', $this->newPivot($pivot));
|
||||
$data[$pivot[$this->localKey]][] = $set;
|
||||
}
|
||||
return $data;
|
||||
|
||||
Reference in New Issue
Block a user