cloudcreativity / laravel-json-api
JSON API (jsonapi.org) support for Laravel applications.
Installs: 941 860
Dependents: 4
Suggesters: 0
Security: 0
Stars: 780
Watchers: 31
Forks: 109
Open Issues: 27
Requires
- php: ^8.2
- ext-json: *
- laravel-json-api/neomerx-json-api: ^5.0.2
- laravel/framework: ^11.0
- nyholm/psr7: ^1.8
- ramsey/uuid: ^4.0
- symfony/psr-http-message-bridge: ^7.0
Requires (Dev)
- ext-sqlite3: *
- guzzlehttp/guzzle: ^7.8
- laravel-json-api/testing: ^3.0
- laravel/legacy-factories: ^1.4.0
- laravel/ui: ^4.4
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^10.5
Suggests
- cloudcreativity/json-api-testing: Required to use the test helpers.
- dev-develop / 7.x-dev
- v7.0.0
- v6.1.0
- v6.0.0
- v5.0.0
- v5.0.0-alpha.1
- v4.1.0
- v4.0.1
- v4.0.0
- v3.3.0
- v3.2.0
- v3.1.0
- v3.0.1
- v3.0.0
- 2.x-dev
- v2.2.0
- v2.1.0
- v2.0.0
- v2.0.0-beta.3
- v2.0.0-beta.2
- v2.0.0-beta.1
- v2.0.0-alpha.2
- v2.0.0-alpha.1
- 1.x-dev
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.1
- v1.0.0
- v1.0.0-rc.2
- v1.0.0-rc.1
- v1.0.0-beta.6
- v1.0.0-beta.5
- v1.0.0-beta.4
- v1.0.0-beta.3
- v1.0.0-beta.2
- v1.0.0-beta.1
- v1.0.0-alpha.4
- v1.0.0-alpha.3
- v1.0.0-alpha.2
- v1.0.0-alpha.1
- 0.x-dev
- v0.13.0
- v0.12.0
- v0.11.5
- v0.11.4
- v0.11.3
- v0.11.2
- v0.11.1
- v0.11.0
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.1
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.0
- v0.2.1
- v0.2.0
- v0.1.1
- v0.1.0
- dev-main
- dev-testing
- dev-async-with-cn
- dev-feature/pagination
This package is auto-updated.
Last update: 2024-12-14 19:50:09 UTC
README
cloudcreativity/laravel-json-api
Status
DO NOT USE THIS PACKAGE FOR NEW PROJECTS - USE laravel-json-api/laravel INSTEAD.
This package has now been rewritten, substantially improved and released as the laravel-json-api/laravel
package.
Documentation for the new version is available on our new website laraveljsonapi.io and the
code is now developed under the
Laravel JSON:API Github organisation.
The cloudcreativity/laravel-json-api
package is now considered to be the legacy package. As we know it is in use in
a lot of production applications, it will continue to receive bug fixes and updates for new Laravel versions. However,
it is no longer supported for new features.
If you are starting a new project, you MUST use the
new package laravel-json-api/laravel
.
Introduction
Build feature-rich and standards-compliant APIs in Laravel.
This package provides all the capabilities you need to add JSON API compliant APIs to your application. Extensive support for the specification, including:
- Fetching resources
- Fetching relationships
- Inclusion of related resources (compound documents)
- Sparse fieldsets.
- Sorting.
- Pagination.
- Filtering
- Creating resources.
- Updating resources.
- Updating relationships.
- Deleting resources.
- Validation of:
- JSON API documents; and
- Query parameters.
The following additional features are also supported:
- Full support for Eloquent resources, with features such as:
- Automatic eager loading when including related resources.
- Easy relationship end-points.
- Soft-deleting and restoring Eloquent resources.
- Page and cursor based pagination.
- Asynchronous processing.
- Support multiple media-types within your API.
- Generators for all the classes you need to add a resource to your 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.
Documentation
Full package documentation is available on Read the Docs.
Slack
Join the Laravel JSON:API community on Slack.
Laravel Versions
Make sure you consult the Upgrade Guide when upgrading between major or pre-release versions.
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
master
branch. - Enhancements / New Features - submit a pull request against the
develop
branch.
We recommend submitting an issue before taking the time to put together a pull request.