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