dorgaren/laravel-json-api
Composer 安装命令:
composer require dorgaren/laravel-json-api
包简介
Legacy (0.x) JSON API (jsonapi.org) support for Laravel applications
README 文档
README
This package is a fork of cloudcreativity/laravel-json-api. It is created to maintain backwards compatibility with 0.x versions.
Reasons:
- there is no upgrade guide nor changelog from 0.x to 1.x;
- the architecture has been changed radically, even to the point where classes become final;
- there is no clear (nor unclear) reasoning behind architectural decisions;
- 0.13 being the last 0.x version released; and
- 0.13 being incompatible with Laravel 5.8+.
Since currently I have to maintain at least one project that has been created when the last version was 0.12.0, extending classes that have become final, and also the package's architecture posing serious questions towards possible use cases having been had considered, I figured it is easier to revamp the original branch than upgrading any projects just yet.
If you face similar problems, feel free to use this fork. I can, while being around, guarantee that I will bump versions and even make minor modifications necessary to keep this compatible with new Laravel versions, and also that I will respond when I deem anything further infeasible or unlikely.
For any new, fresh "greenfield" projects, though, it is advisable that you use the mainline package, either 1.x or 2.0 when it will become final.
Add jsonapi.org compliant APIs to your Laravel 5 application. Based on the framework agnostic packages neomerx/json-api and cloudcreativity/json-api.
What is JSON API?
From jsonapi.org
If you've ever argued with your team about the way your JSON responses should be formatted, JSON API is your anti-bikeshedding weapon.
By following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus on what matters: your application. Clients built around JSON API are able to take advantage of its features around efficiently caching responses, sometimes eliminating network requests entirely.
For full information on the spec, plus examples, see http://jsonapi.org
Demo
A demo application is available at here.
Laravel Versions
| Laravel | This Package |
|---|---|
| 5.4.* | ^0.13 |
| 5.5.* | ^0.13 |
| 5.6.* | ^0.13 |
| 5.7.* | ^0.13 |
Make sure you consult the Upgrade Guide when upgrading.
Lumen
Currently we have not integrated the package with Lumen. If you use Lumen and can help, please let us know on this issue.
Documentation
Documentation is available on Read the Docs.
Status
This repository is under development. We have production applications that are using the package and extensive test coverage of these applications.
We are aiming for v1.0 as soon as possible. See this issue for progress.
License
Apache License (Version 2.0). Please see License File for more information.
Installation
Installation is via composer. See the documentation for complete instructions.
Contributing
Contributions are absolutely welcome. Ideally submit a pull request, even more ideally with unit tests. Please note the following:
- Bug Fixes - submit a pull request against the
masterbranch. - Enhancements / New Features - submit a pull request against the
developbranch.
We recommend submitting an issue before taking the time to put together a pull request.
dorgaren/laravel-json-api 适用场景与选型建议
dorgaren/laravel-json-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 76 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 10 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「json」 「api」 「laravel」 「jsonapi」 「JSON-API」 「jsonapi.org」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dorgaren/laravel-json-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dorgaren/laravel-json-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dorgaren/laravel-json-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Kinikit - PHP Application development framework MVC component
ext-json wrapper with sane defaults
A package to cast json fields, each sub-keys is castable
A PSR-7 compatible library for making CRUD API endpoints
swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations
Get wordpress nav menus and share the main site menus with the child sites.
统计信息
- 总下载量: 76
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-10-06