Support the ongoing development of Laravel.io →
Requests Database Eloquent
Last updated 5 months ago.
0

In full disclosure, I don't know anything about this. But I am interested to know how to do this. Looking at the code, perhaps the chunk itself should be converted to an array?

MyModel::insert($chunk->toArray()); //insert chunked data
0

Thank bigwheel16! This worked very well as was very fast, but I had to limit the $qty allowed per request. On my server, I found that number to be around 250,000.

0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.