Support the ongoing development of Laravel.io →
Configuration Eloquent Validation
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

HI It works. I know it is not the right way but temporarily at least it works for now.

Thank you very much

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.