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

So it seems you are working with Eloquent Collections so you could always just use a next statement if looping over the results.

But, I would make a couple suggestions. One would be to apply the where before getting all the records. The other may be more useful if you have a lot of records. That suggestion would be to use a raw query to know of the file exports, using the LOAD_FILE function to automatically skip records inside the query vs in the code.

Good luck!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

devninja devninja Joined 4 Dec 2014

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.