Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

faustbrian-archives/laravel-collection-export

Repository files navigation

Laravel Collection Export

Build Status PHP from Packagist Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

composer require artisanry/collection-export

And then include the service provider within app/config/app.php.

Artisanry\CollectionExport\CollectionExportServiceProvider::class

Usage

Export/Download an Illuminate\Support\Collection
(new Artisanry\CollectionExport\Export)->filename('users')->csv(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->json(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->pdf(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->xls(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->xlsx(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->xml(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->yaml(User::get());
(new Artisanry\CollectionExport\Export)->filename('users')->yamlInline(User::get());

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover a security vulnerability within this package, please send an e-mail to hello@basecode.sh. All security vulnerabilities will be promptly addressed.

Credits

License

Mozilla Public License Version 2.0 (MPL-2.0).