mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进
This commit is contained in:
@@ -239,7 +239,7 @@ class BelongsToMany extends Relation
|
|||||||
$result = false;
|
$result = false;
|
||||||
foreach ($dataSet as $key => $data) {
|
foreach ($dataSet as $key => $data) {
|
||||||
if (!$samePivot) {
|
if (!$samePivot) {
|
||||||
$pivot = !empty($pivot) ? $pivot[$key] : [];
|
$pivot = isset($pivot[$key]) ? $pivot[$key] : [];
|
||||||
}
|
}
|
||||||
$result = $this->attach($data, $pivot);
|
$result = $this->attach($data, $pivot);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user