sinemacula/laravel-resource-exporter
A Laravel package for exporting resource collections and application data to downloadable files. It provides a clean, configurable API for choosing fields and formats, reducing repetitive boilerplate and making reports, admin exports, and data handoff workflows easier to build.
Architecture fit
sinemacula/laravel-resource-exporter sits in the presentation/serialisation layer of a Laravel application: it extends the framework's JsonResource/ResourceCollection concepts into file-oriented export formats. For a TPM this is a low-coupling placement — the package does not touch persistence, queue infrastructure, or HTTP transport beyond the controller that streams the response. It fits any Laravel service that already exposes API Resources and now needs CSV/XLSX/JSON/XML deliverables (reporting endpoints, data-portability requests, finance/BI hand-offs, admin "download" buttons) without building a bespoke serialiser per format. Teams that have not adopted API Resources get less value, since the package's leverage comes from reusing existing resource definitions rather than duplicating column mapping.
Integration feasibility
Consumption is standard Composer + Laravel package discovery: composer require sinemacula/laravel-resource-exporter, optionally publish config, then declare exporter classes alongside existing resources. Effort is measured in hours for a first export, not sprints. The main integration question is not "can we" but "where does the export run" — inline request vs. queued job — which is an application design decision the package does not make for us.
Technical risk
^3.1 and read the 3.0.0 upgrade notes before writing exporters.illuminate/* constraint was widened, keeping Laravel 11/12 support, or (b) the constraint was moved forward, silently dropping older majors. We must read composer.json at the 3.1.0 tag to know which. This is the single highest-value verification step.Key questions
Stack fit Best fit: Laravel 11/12/13 on PHP 8.2+, already using API Resources, needing multi-format export from a small number of endpoints. Poor fit: applications with heavy custom serialisation, non-Laravel PHP services, or teams needing vendored commercial support. The package is a convenience layer — it saves writing format-specific serialisers, and that saving compounds only if we have several export surfaces.
Migration path Two entry scenarios:
Compatibility
Confirm in this order: PHP version → Laravel major → our pinned illuminate/* constraints → any transitive dependency conflicts (composer why-not). Because most Laravel apps already carry a large dependency graph, run composer require --dry-run in a scratch branch first. If we are still on Laravel 11 or 12, verify 3.1.0 has not dropped us; if it has, either stay on 3.0.x (and accept it is now off the support path) or schedule the framework upgrade first.
Sequencing
composer.json and CHANGELOG at tag 3.1.0; build one exporter against a non-critical resource; measure memory and wall time at realistic row counts.^3.1, record the supported Laravel matrix in our dependency register.Maintenance Ongoing cost is low but non-zero: a Composer dependency to track, plus a framework-major upgrade task each Laravel cycle. Given the reactive support pattern observed here, add this package to the "verify early" list in our framework-upgrade runbook — do not discover constraint incompatibility during a release window. No config drift expected if we keep exporter definitions in version control alongside resources.
Support No vendor SLA. Internal ownership must be explicit: one named engineer owns the dependency, the pinned version, and the upgrade task. Escalation path for defects is upstream issues, then fork. Because the package is small and single-purpose, a fork is a credible fallback — that mitigates the bus-factor risk substantially, provided we keep our usage surface narrow and avoid deep extension of internals.
Scaling
The scaling axis is rows-per-export, not requests-per-second. Synchronous exports of large collections will hit PHP memory_limit and web-tier timeouts, and will pin a PHP-FPM worker for the duration. Design assumption to set with stakeholders: anything above roughly 10k rows goes to a queued job writing to object storage. Concurrency is bounded by queue workers, not by the package — so export volume becomes a queue-capacity planning input rather than a web-tier concern. This is a favourable property: it isolates export load from request latency.
Failure modes
composer update blocked during a framework major, stalling the platform roadmap; surfaced only if the dependency is in the upgrade dry-run set.Ramp-up Low for engineers already fluent in API Resources: roughly half a day to a day for the first exporter, mostly spent on format options rather than package mechanics. Teams unfamiliar with the resource layer need to learn that pattern first — in which case the ramp-up cost belongs to the resource refactor, not to this package. Document one canonical exporter plus one canonical queued-export pattern in the internal handbook; that artefact will carry most of the onboarding load and is worth writing once rather than per team.
How can I help you explore Laravel packages today?