It is not supposed to save 3 rows if you work on a single model.
What you are doing now is: take a Model, assign it some values in a loop, then save and again and again. That being said, you saved the same row 3 times (insert, update, update).
Move $post2 = new Article_tag;
into the loop block to make it work. Still this whole thing is a mess, but that's another story.
HI It works. I know it is not the right way but temporarily at least it works for now.
Thank you very much
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community