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!
The Laravel portal for problem solving, knowledge sharing and community building.
The community