audunru/export-response
A Laravel package for returning downloadable export responses, making it easy to turn query results or data sets into streamed file downloads such as CSV instead of building export responses by hand.
Accept header, one endpoint can serve CSV and JSON rather than proliferating /export.csv and /export.json routes. That's a decision about API contracts, documentation, and client integration cost.Vary: Accept to middleware responses. That is the header that tells shared caches a response differs by requested format — without it, a CDN or reverse proxy can serve CSV to a client that asked for JSON. This is a correctness fix that de-risks putting exports behind HTTP caching, and it's worth factoring into any infrastructure decision about caching export routes.Adopt when:
Look elsewhere when:
Note on maturity: the only signal in this release is a narrow header-correctness patch. That's a positive indicator of maintenance and HTTP rigor, but it is not evidence of feature breadth — validate fit with a spike on one real export before standardizing.
For executives: This is a small, narrowly scoped dependency that lets us ship "download as CSV/JSON" and data-portability features faster, with correct HTTP and caching behavior handled for us rather than rebuilt per feature. Scope is limited, lock-in is low, and the project is actively maintained — the latest patch is a correctness fix, not a feature grab.
For engineering: A Laravel package for exportable responses with Accept-header content negotiation. Integration is minimal: return the package's response type and attach its middleware. v5.1.3 adds Vary: Accept to middleware responses, fixing cross-format cache contamination — a real bug if export routes sit behind a CDN or shared cache. Recommendation: timebox a spike on one export endpoint to confirm it covers our formats and data sizes; keep complex spreadsheet and report generation on Laravel Excel; revisit if we later need queued or async exports.
How can I help you explore Laravel packages today?