haddowg/json-api-laravel
Composer 安装命令:
composer require 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.
README 文档
README
Part of the jsonapi.rest suite — a complete, spec-compliant JSON:API 1.1 stack for PHP: a framework-agnostic core, a Symfony bundle, 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
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: 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
- PHP
^8.3(8.3 / 8.4 / 8.5) - Laravel
^12.0 || ^13.0(via theilluminate/*components)
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
Full documentation is published at haddowg.github.io/json-api-laravel. Start with install and getting started, or browse the documentation index.
Core concepts (fields, relations, constraints, response value objects) live in the core documentation.
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.
License
Released under the MIT License.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-13