Patrick Brouwers introduces Laravel Excel 3.1 and shows us how to use it.

laravel excel

Features

Easily export collections to Excel. Supercharge your Laravel collections and export them directly to an Excel or CSV document. Exporting has never been so easy.

Supercharged exports. Export queries with automatic chunking for better performance. You provide us the query, we handle the performance. Exporting even larger datasets? No worries, Laravel Excel has your back. You can queue your exports so all of this happens in the background.

Supercharged imports. Import workbooks and worksheets to Eloquent models with chunk reading and batch inserts! Have large files? You can queue every chunk of a file! Your entire import will happen in the background.

Export Blade views. Want to have a custom layout in your spreadsheet? Use a HTML table in a Blade view and export that to Excel.

Tutorial

https://medium.com/maatwebsite/introducing-laravel-excel-3-1-e478502bf92e

Source Code

https://github.com/Maatwebsite/Laravel-Excel