Skip to content

Commit 24f3479

Browse files
[11.x] Fix sync is running touch query twice (#51984)
* Fix sync is running touch query twice * Update InteractsWithPivotTable.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 8d20a9c commit 24f3479

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function sync($ids, $detaching = true)
102102
$detach = array_diff($current, array_keys($records));
103103

104104
if (count($detach) > 0) {
105-
$this->detach($detach);
105+
$this->detach($detach, false);
106106

107107
$changes['detached'] = $this->castKeys($detach);
108108
}

0 commit comments

Comments
 (0)