定制 haddowg/json-api-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

CI Latest Version PHP Version License

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 the illuminate/* 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
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固