mathieutu/exporter
A Laravel package for exporting data to CSV/Excel with a simple, fluent API. Define exportable columns, handle relations and formatting, and generate downloadable files effortlessly.
Architecture fit
mathieutu/exporter is a thin, config-driven serialization layer: an Exportable trait plus an Exporter facade that maps a declarative attribute array (with dot-notation for nested objects, relations, and collections) to output arrays. It slots into the presentation edge of a Laravel application, not the domain core.$export arrays. That is attractive for internal tooling, admin CSV/reporting endpoints, and rapid prototypes where boilerplate Resource classes are disproportionate.Integration feasibility
composer require, with Laravel package auto-discovery; there is no meaningful infrastructure footprint, queue dependency, or database migration. Rollback is a composer removal plus deletion of trait usage.$export arrays per model, confirm nested dot-notation resolves Eloquent relations as expected, and add tests around each export shape.Technical risk
composer.json constraints.Key questions
Stack fit
Migration path
ExportPresenter::toArray($model, array $attributes)) so the package is an implementation detail. This preserves the option to swap to API Resources, Fractal, or a fork with zero caller churn.Compatibility
Model::preventLazyLoading() and with strict mode enabled, since implicit relation traversal is the most likely production surprise.Sequencing
Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?