Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 1.12 KB

README.md

File metadata and controls

44 lines (36 loc) · 1.12 KB
home heroImage actionText actionLink features footer
true
/assets/img/logo-small.png
Read documentation →
/3.0/
title details
💪 Export collections to Excel.
Supercharge your Laravel collections and export them directly to an Excel or CSV document. Exporting has never been so easy.
title details
🚀 Supercharged exports.
Export queries with automatic chunking for better performance. For even more superpowers, exports can also be queued.
title details
🔥 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.
MIT Licensed | Powered by Maatwebsite

💡 Install the package via composer

composer require maatwebsite/excel

💪 Create an export class

php artisan make:export UsersExport --model=App\\User

🔥 Download your export

<?php 

use App\UsersExport;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Controllers\Controller;

class UsersController extends Controller 
{
    public function export() 
    {
        return Excel::download(new UsersExport, 'users.xlsx');
    }
}