Hi, When you use attach() method in a many to many relation, you can add this record multiple times.
Here is an example of the pivot table
id, model1, model2
1, 10, 11
2, 10, 11
And, I'd like to forbidden this behavior.
Sync() method can't be used in my case. Thanks.
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.