Support the ongoing development of →
Input Database Eloquent
Last updated 1 year ago.

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!


Sign in to participate in this thread!


Your banner here too?

devninja devninja Joined 4 Dec 2014


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.

© 2024 - All rights reserved.