Skip to content

Commit

Permalink
[11.x] Fix sync is running touch query twice (#51984)
Browse files Browse the repository at this point in the history
* Fix sync is running touch query twice

* Update InteractsWithPivotTable.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
Tofandel and taylorotwell authored Jul 2, 2024
1 parent 8d20a9c commit 24f3479
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function sync($ids, $detaching = true)
$detach = array_diff($current, array_keys($records));

if (count($detach) > 0) {
$this->detach($detach);
$this->detach($detach, false);

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

0 comments on commit 24f3479

Please sign in to comment.