Download the PHP package fersot/model-export without Composer
On this page you can find all versions of the php package fersot/model-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fersot/model-export
More information about fersot/model-export
Files in fersot/model-export
Package model-export
Short Description Export Eloquent queries, collections or arrays to Excel/CSV with a fluent API, column mapping, chunk processing and streaming downloads.
License MIT
Homepage https://github.com/fersot/model-export
Informations about the package model-export
Laravel Model Export
Export Eloquent queries, Collections, or arrays to Excel or CSV with a fluent API, column mapping, transform callbacks, chunk processing, and streaming HTTP downloads.
Installation
Laravel auto-discovers the service provider and facade. Optionally publish the config:
Quick Start
Sources
Fluent Options
Column Mapping
Define columns explicitly with a custom label and optional value transformer:
When ->columns() is used, only the specified columns are exported in the exact order defined.
Filter Columns (without mapping)
Chunk Processing (large datasets)
Output Formats
Macros
After the service provider boots, macros are available on EloquentBuilder and Collection:
HasExport Trait
Add the trait to any Eloquent model for convenient export methods:
Configuration
After publishing, edit config/model-export.php:
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| Laravel | ^9.0 \| ^10.0 \| ^11.0 \| ^12.0 |
| fersot/excel-to | ^2.0 |
Testing
22 tests covering all features.
Author
Hember Colmenares — GitHub
Support ☕️
License
MIT — see LICENSE.
All versions of model-export with dependencies
fersot/excel-to Version ^2.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0