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

You could create an eloquent model that represents the csv data, covert the collection to an array and create a new instance of the model using the array data.

0

That's actually very close to what I did after playing around. I just looped through the array and matched the keys with the table objects, and it seems to work well enough. Hopefully I won't have any memory issues, but that's for another topic.

Thank you very much for your input KevinCreel.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Yelldon yelldon Joined 2 Mar 2015

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.