flugger/laravel-responder
Laravel Responder builds clean, consistent API responses with Fractal transformers, automatic exception handling, and flexible serialization. Turn Eloquent models into well-structured JSON with minimal effort and full control.
Architecture fit
respond() / the Respondable trait, transformers extend Flugg\Responder\Transformers\Transformer, and the package wires in Fractal for serialization. It does not touch models, persistence, or domain logic, so it is architecturally non-invasive and can be adopted endpoint-by-endpoint.success, status, data, error), sparse fieldsets via ?include=, eager-load hinting via ?with=, and pagination metadata. That removes a class of hand-rolled response boilerplate and standardizes contracts across teams.Integration feasibility
Technical risk
league/fractal) have both had slow release cadences; the practical question is whether current Laravel (10/11) and PHP 8.2+ are supported, or whether we inherit a fork. This must be verified against composer.json constraints and the actual test matrix, not assumed from the star count.?include= handling can obscure eager-loading behavior; undisciplined use is a credible N+1 vector.JsonResource responses.Key questions
illuminate/support and league/fractal pins)?data/error envelope sufficient?Stack fit
JsonResource/ResourceCollection.Migration path
Compatibility
illuminate/* constraint, and league/fractal version. The Fractal pin is the one most likely to force an upgrade decision elsewhere in the dependency graph.Sequencing
?include=, ?with=, pagination, and error formatting.Maintenance
Support
Scaling
?include= relations. Enforce eager-load hints and monitor query counts per endpoint in staging.Failure modes
?include= on a relation that does not exist or is not permitted → error or silent omission depending on config; both are consumer-visible surprises.success/data break in confusing ways.Ramp-up
How can I help you explore Laravel packages today?