I would like to have a way to limit the number of total result in an export. Like we can chunk, I would like that there is an absolute limit in terms of the number of result the export can do with a fromQuery (I know that with an iterator, a collection or whatever I can do some limitation but I don't know why I would do something like this if it's kind easy to add)
If it's not possible (I didn't see anything, but perhaps I miss one) I would like to add something similar to this..
probably in \Maatwebsite\Excel\Sheet::fromQuery adding something like this
if ($sheetExport implements WithLimit) {
// ... if limit reach then stop looping
}
There's no limiting hard cut off currently. You could limit the query by using a where, e.g. on last id.
For info (if someone find this), to solve this issue that's more new feature now
I use FromIterator interface, with LimitIterator and a query builder that generate the result through an iterator.
For info (if someone find this), to solve this issue that's more new feature now
I use FromIterator interface, with LimitIterator and a query builder that generate the result through an iterator.
Do you have an example of you use it?
Most helpful comment
For info (if someone find this), to solve this issue that's more new feature now
I use FromIterator interface, with LimitIterator and a query builder that generate the result through an iterator.