nilportugues/laravel5-json-api
Laravel 5 package for building APIs that follow the JSON API specification (jsonapi.org). It transforms Eloquent models and collections into spec-compliant responses, including relationships, pagination, errors, and content negotiation, with minimal setup and configuration.
included compound documents, pagination links, sparse fieldsets, and standardized error documents.include) cut round trips; sparse fieldsets trim payloads for low-bandwidth clients — both become design levers rather than afterthoughts.Adopt when:
nilportugues/json-api core transformers and want the Laravel wiring (service provider, facade, spec-conformant exception/error handling).Look elsewhere when:
laravel-json-api (actively maintained) for full spec compliance.Executives: This is a thin adapter that makes our API responses conform to an open standard (JSON:API). It reduces integration friction with partners and client apps and eliminates custom response-shaping work — faster delivery, fewer contract bugs, cheaper onboarding. The latest release is a small pagination fix, which improves consistency but is not evidence of a maintained product — so approve it as a tactical fit for our existing Laravel 5 systems only, paired with a funded modernization path, not as a long-term platform bet.
Engineering: Drop-in JSON:API compliance on Laravel 5 — resource/relationship serialization, included compound documents, standard error objects, and service-provider wiring on top of nilportugues/json-api. 2.4.7 aligns default pagination with Eloquent's per-page, which removes a subtle source of inconsistency between our API layer and query layer — worth taking, but it changes default page size at the edges, so diff pagination links in tests before shipping. Adoption cost stays low; the risk profile is unchanged: no PHP 8 assurance, no dependent ecosystem, sporadic releases. Pin versions, vendor/fork if adopted, and treat it as a bridge. Recommendation: borrow the patterns now; migrate to Laravel's native API Resources or laravel-json-api at the next framework upgrade. Do not build a durable dependency on this package.
How can I help you explore Laravel packages today?