Laravel Excel 2.1
Appearance
Laravel Excel 2.1
Appearance
To download the created file, use ->export($ext) or ->download($ext).
Excel::create('Filename', function($excel) {
})->export('xls');
// or
->download('xls');
->export('xlsx');
// or
->download('xlsx');
->export('csv');
// or
->download('csv');
You can set the default enclosure and delimiter inside the config
To export files to pdf, you will have to include "dompdf/dompdf": "~0.6.1", "mpdf/mpdf": "~6.1" or "tecnick.com/tcpdf": "~6.0.0" in your composer.json and change the export.pdf.driver config setting accordingly.
->export('pdf');