laravel belongstomany prevent duplicates attach

39

$cart->items()->syncWithoutDetaching([$item->id]);

Comments

Submit
0 Comments