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');
}
}