rockbuzz/lara-export

Laravel Export

Installs: 282

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

pkg:composer/rockbuzz/lara-export

dev-main 2023-05-17 17:43 UTC

This package is auto-updated.

Last update: 2025-10-17 23:45:59 UTC


README

Laravel Export

Requirements

PHP: >=7.4

Install

$ composer require rockbuzz/lara-export
use Rockbuzz\LaraExport\Export;

class YourController extends Controller
{
    public function index()
    {
        (new Export)
            ->header(['name', 'email'])
            ->data([
                ['name' => 'John Doe', 'email' => 'john@domain.com'],
                ['name' => 'Jane Doe', 'email' => 'jane@domain.com'],
            ])
            //->output(storage_path("app/exports/$filename"), Export::CSV);
            ->save(storage_path("app/exports/$filename"), Export::CSV);
    }

}

License

The Lara Export is open-sourced software licensed under the MIT license.