usmanhalalit / laracsv

CSV files from Eloquent model in seconds - a Laravel package.
MIT License
605 stars 59 forks source link

Download break loop #40

Closed guimadalozzo closed 4 years ago

guimadalozzo commented 4 years ago

When I execute the download, the loop foreach was break.

How download multiples CSVs?

foreach ($teste->roboTesteEmpresa as $empresa) { $historicos = HistoricoCotacoes::all(); $csvExporter = new \Laracsv\Export(); $csvExporter->build($historicos, ['close'], ['header' => false])->output("test.csv"); }

usmanhalalit commented 4 years ago

File download writes output, you can't force download of multiple files in one action.