PHPackages                             haddowg/json-api-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. haddowg/json-api-laravel

ActiveLibrary[HTTP &amp; Networking](/categories/http)

haddowg/json-api-laravel
========================

Laravel package for haddowg/json-api: idiomatic routing, content negotiation, validation, and an Eloquent data layer for spec-compliant JSON:API 1.1 endpoints.

v1.0.0(1mo ago)00[1 PRs](https://github.com/haddowg/json-api-laravel/pulls)MITPHPPHP ^8.3CI passing

Since Jul 13Pushed 1mo agoCompare

[ Source](https://github.com/haddowg/json-api-laravel)[ Packagist](https://packagist.org/packages/haddowg/json-api-laravel)[ Docs](https://github.com/haddowg/json-api-laravel)[ RSS](/packages/haddowg-json-api-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (23)Versions (3)Used By (0)

json-api-laravel
================

[](#json-api-laravel)

[![CI](https://github.com/haddowg/json-api-laravel/actions/workflows/ci.yml/badge.svg)](https://github.com/haddowg/json-api-laravel/actions/workflows/ci.yml)[![Latest Version](https://camo.githubusercontent.com/fc25c821f4172a4ceb071ee0f42a9b93a2d3df88b89b9f361764350ea4af3fa2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686164646f77672f6a736f6e2d6170692d6c61726176656c2e737667)](https://packagist.org/packages/haddowg/json-api-laravel)[![PHP Version](https://camo.githubusercontent.com/6bbf1ed1912387524db087a7c42c4a2d856206767417b21fdf61b228aa6d56db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f686164646f77672f6a736f6e2d6170692d6c61726176656c2e737667)](https://packagist.org/packages/haddowg/json-api-laravel)[![License](https://camo.githubusercontent.com/a8531f966efd1db1d84b7833f4be03370a1907275359d2c79cef0f48b563e796/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f686164646f77672f6a736f6e2d6170692d6c61726176656c2e737667)](LICENSE)

> **Part of the [jsonapi.rest](https://jsonapi.rest) suite** — a complete, spec-compliant JSON:API 1.1 stack for PHP: a framework-agnostic [core](https://github.com/haddowg/json-api), a [Symfony bundle](https://github.com/haddowg/json-api-symfony), this **Laravel package**, and a typed TypeScript client, bound together by one conformance-tested OpenAPI 3.1 contract.

A Laravel package that makes [`haddowg/json-api`](https://github.com/haddowg/json-api)idiomatic in a Laravel application: declare a JSON:API type as a class and get the standard endpoint set — spec-compliant JSON:API 1.1 documents, content negotiation, validation, policy authorization, and an **Eloquent data layer** — with no controller, handler, or serializer wired by hand.

It is the Laravel twin of the [Symfony bundle](https://github.com/haddowg/json-api-symfony): both build on the same framework-agnostic core and project a **byte-identical OpenAPI document**for an identical domain, so a client generator consumes either backend unchanged.

Requirements
------------

[](#requirements)

- PHP `^8.3` (8.3 / 8.4 / 8.5)
- Laravel `^12.0 || ^13.0` (via the `illuminate/*` components)

Install
-------

[](#install)

```
composer require haddowg/json-api-laravel
php artisan vendor:publish --tag=jsonapi-config   # optional — customise servers, pagination, OpenAPI
```

The service provider is auto-discovered and core is pulled in transitively — there is nothing to register by hand.

Documentation
-------------

[](#documentation)

Full documentation is published at **[haddowg.github.io/json-api-laravel](https://haddowg.github.io/json-api-laravel/)**. Start with [install](https://haddowg.github.io/json-api-laravel/install/) and [getting started](https://haddowg.github.io/json-api-laravel/getting-started/), or browse the [documentation index](https://haddowg.github.io/json-api-laravel/).

Core concepts (fields, relations, constraints, response value objects) live in the [core documentation](https://haddowg.github.io/json-api/).

Demo
----

[](#demo)

`docker compose up` serves the full twelve-type music-catalog example over HTTP — browse `http://localhost:8080/api/albums` and the interactive OpenAPI docs at `http://localhost:8080/docs`. See the [Docker guide](https://haddowg.github.io/json-api-laravel/docker/).

License
-------

[](#license)

Released under the [MIT License](LICENSE).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8deead49df3205ca08127866adcc5146559895aec400119a64ffe6f4e6477c65?d=identicon)[haddowg](/maintainers/haddowg)

---

Top Contributors

[![haddowg](https://avatars.githubusercontent.com/u/10784397?v=4)](https://github.com/haddowg "haddowg (48 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

eloquentjson-apijsonapilaravelopenapiphprest-apiapilaravelresteloquentjsonapiJSON-API

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/haddowg-json-api-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/haddowg-json-api-laravel/health.svg)](https://phpackages.com/packages/haddowg-json-api-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

58190.1k22](/packages/api-platform-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M273](/packages/laravel-mcp)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k17.6M167](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

1.0k2.5M153](/packages/roots-acorn)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
