Skip to content
Advertisement

How to save data?

My data is like this

first

After re-saving the data is saved two double.

second

JavaScript

Advertisement

Answer

you need to used updateOrCreate method instead of firstOrCreate

JavaScript

for more information read this article https://eloquentbyexample.com/course/lesson/lesson-7-creating-and-updating

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement