home | heroImage | actionText | actionLink | features | footer | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
true |
/assets/img/logo-small.png |
Read documentation → |
/3.0/ |
|
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');
}
}