laravel-json-api

JSON API (jsonapi.org) package for Laravel applications.

  • 所有者: cloudcreativity/laravel-json-api
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Build Status

cloudcreativity/laravel-json-api

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.

Tutorial and Documentation

Want a tutorial to get started? Read the
How to JSON:API Laravel tutorial.

Full package documentation is available on
Read the Docs.

Demo

A demo application is available at here.

Laravel Versions, Laravel, This Package, ---, ---, ^6.0, ^1.4, 5.8.*, ^1.0, 5.7.*, ^1.0, 5.6.*, ^1.0, 5.5.*, ^1.0, Make sure you consult the Upgrade Guide

when upgrading between major or pre-release versions.

You may notice that there are 2.0.0-alpha tags. We do not recommend using these versions
until we hit beta releases.

Lumen

Currently we have not integrated the package with Lumen. We do not have any active projects that use Lumen,
so if you do and can help, please let us know on
this issue.

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.

主要指標

概覽
名稱與所有者cloudcreativity/laravel-json-api
主編程語言PHP
編程語言PHP (語言數: 1)
平台
許可證Apache License 2.0
所有者活动
創建於2015-09-08 23:16:13
推送於2025-03-21 21:32:17
最后一次提交
發布數81
最新版本名稱v7.2.0 (發布於 2025-03-21 21:22:20)
第一版名稱v0.1.0 (發布於 )
用户参与
星數785
關注者數30
派生數106
提交數1k
已啟用問題?
問題數542
打開的問題數26
拉請求數87
打開的拉請求數0
關閉的拉請求數22
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?