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

Related tags

API php laravel json-api
Overview

Tests

cloudcreativity/laravel-json-api

Status

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, please use the new package laravel-json-api/laravel instead.

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.

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.

Slack

Join the Laravel JSON:API community on Slack.

Laravel Versions

Laravel This Package
^8.0 ^3.0
^7.0 ^2.0
^6.0 ^1.7
5.8.* ^1.7
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.

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.

Comments
  • Laravel 5.3 support

    Laravel 5.3 support

    It would be nice to get an update with support for Laravel 5.3. Looks like the service provider needs to have it's dependency injection removed from the method signature.

    https://laravel.com/docs/5.3/upgrade

    We're currently using v0.2, so if an update could be issued to this version, that would be great.

    bug 
    opened by egeriis 37
  • Future design and request for comments

    Future design and request for comments

    Plan for Version 2

    We are starting to turn our attention to version 2 of this package. This issue describes the thinking and invites any comments/suggestions about the approach. We're aware a lot of people are using this package, so we want to get this right.

    Background

    When we first wrote this Laravel package, it was based on a framework-agnostic implementation because we weren't just using it in a Laravel application. One of the best decisions of the 1.0.0-alpha/beta series was to move the code into this package and develop it as a solely-Laravel package.

    During the 1.0 development we started making it feel more like a Laravel package, however there was a limit to how much we could do that without introducing more breaking changes than we were comfortable with.

    The other bit of background is that we use the neomerx/json-api package, predominantly for the encoding. That package has a great attention on making encoding performant, so we still want to use it. However, we are not entirely confident that decisions made on that package fit with our overall approach and unfortunately recent changes to that package make extending some of the internals complex.

    Additionally, exposing the neomerx interfaces to the Laravel developer makes this package feel less intuitively like a Laravel package - as there's more code to wrap your head around.

    Aims

    Based on this background, there are two main things we want 2.0 to achieve:

    1. Make the use of this package align closely with existing Laravel approaches (wherever possible); and
    2. Hide the use of the neomerx package so it becomes an internal implementation detail, rather than something the developer needs to know about.

    Laravel Alignment

    Currently we have:

    - App
        - Http
            - Controllers
                - Api
                    - PostsController (optional)
        - JsonApi
            - Posts
                - Adapter
                - Schema
                - Validators
                - Authorizer (optional)
                - ContentNegotiator (optional)
    

    This will still work on 2.0, requiring only minor interface changes and PHP 7 type-hinting to upgrade. Any code relating to the implementation will be marked as deprecated and removed in 3.0.

    Our new style for 2.0 will be this:

    - App
        - Http
            - Controllers
                - Api
                    - PostController (optional)
            - Resources
                - JsonApi
                    - PostAdapter
                    - PostResource
                    - PostCollection (optional)
            - Requests
                - JsonApi
                    - PostRequest
                    - PostQuery
    

    The reason for the JsonApi namespaces is to prevent collisions with existing classes, e.g an Eloquent PostResource, or an existing PostRequest form request. It also makes it entirely clear which classes are to do with your JSON-API implementation.

    There will be an option to sub-namespace things if you have multiple JSON APIs. E.g. if we have a v1 and v2 API, the resources will be JsonApi\V1\PostResource, JsonApi\V2\PostResource etc.

    This means the following differences from the current implementation:

    • Schema is replaced by PostResource, which will have a similar style to Eloquent resources. Similar is intentionally used, because the Eloquent approach will not fully work for JSON API, and it has some aspects that would undermine the performance of the JSON API encoder. Resource classes will implement Responsable and JsonSerialize so that they can be used in other contexts as required.
    • Validators is split into PostRequest for validating request JSON content and PostQuery to validate the query parameters for a response that will contain posts resources.
    • Authorizers cease to exist and use standard Laravel authorization via middleware, form request authorize methods, controller middleware and controller helpers.
    • ContentNegotiators are removed but the use-case is fully supported (and documented). Different media-types will be easier to wire in as there will be a specific PostRequest and PostQuery on which validation can be customised or skipped.
    • Adapters will return either the resource class, or the resource collection class, or null. These will allow the adapter to provide meta and links as needed.
    • Standard Laravel route bindings will be used.
    • The default controller will be composed using traits, allowing a developer to create their own custom controllers if they want. We will offload the running of the HTTP handling logic into a Server class, so it's easier to call our default handling of JSON API requests from within a custom controller if needed.
    • Controller and adapter hooks will be replaced with standard Laravel events. For resource update events, we will provide data about the before and after state, allowing listeners to decide to do something if a resource field has changed.
    • We will enable auto-generation of API docs by inspecting defined routes and the request/query classes. We will show example resources by serializing models created via Eloquent factories. This means the docs output will need to be created in development, and can then be committed to version control.

    As an example, our new default controller would look like this:

    <?php
    
    namespace CloudCreatvity\LaravelJsonApi\Http\Controllers;
    
    use CloudCreativity\LaravelJsonApi\Http\Actions;
    
    class ResourceController
    {
    
        use Actions\Index;
        use Actions\Store;
        use Actions\Show;
        use Actions\Update;
        use Actions\Destroy;
        use Actions\Related\Show;
        use Actions\Relationships\Show;
        use Actions\Relationships\Replace;
        use Actions\Relationships\Add;
        use Actions\Relationships\Remove;
    }
    

    The action names here match Laravel's default names for resource controllers - except for relationships, as they are a JSON API concept.

    This means that if the developer wanted to write their own controller, changing the method signatures of some of the actions, they could compose their own controller using our traits - but omit the ones they want to change. E.g.

    <?php
    
    namespace App\Http\Controllers\Api;
    
    use App\Http\Controllers\Controller;
    use App\Http\Resources\JsonApi\PostRequest;
    use App\Http\Resources\JsonApi\PostQuery;
    use CloudCreativity\LaravelJsonApi\Http\Actions;
    use CloudCreativity\LaravelJsonApi\Facades\JsonApi;
    use Illuminate\Contracts\Support\Responsable;
    
    class PostController extends Controller
    {
    
        // default actions, e.g.
        use Actions\Index;
    
        public function store(\Illuminate\Http\Request $request): Responsable
        {
            if ($something) {
                // return something custom.
            }
    
           // use our standard implementation via the `server()` helper.
           // lazily resolving the request/query classes means JSON API validation only happens now.
           return JsonApi::server()->store(
                app(PostRequest::class),
                app(PostQuery::class)
            );
        }
    }
    

    Outside of HTTP requests, you can query your resources using a fluent JSON API query syntax. This effectively allows you to run the logic within your adapters in a style familiar to a Laravel Query Builder (but using JSON API terms, such as include). Say we wanted to get a PostResource from a post id:

    $resource = JsonApi::resources()->posts()->include('comments', 'author')->find($postId);
    
    return \json_encode($resource);
    

    Neomerx Package

    We are currently using v1 of the neomerx package, but it is currently on v3 - which contains a lot of performance improvements. We therefore desperately need to upgrade.

    However, as the current implementation involves developers extending or type-hinting classes/interfaces from the neomerx package, this change will be extremely breaking.

    As we plan to change our use of the neomerx package to an internal implementation detail, 2.0 of our package will set the neomerx Composer constraint to ^1.0.3|^3.0. We will detect the version installed, caching the answer in config for performance reasons, and adjust the implementation internally to use either.

    Developers will therefore be able to upgrade to 2.0 without changing their existing Schemas etc. And can then upgrade to neomerx v3 once they have converted to the new PostResource pattern described above.

    How Can You Help?

    Provide comments on this approach and highlight potential problems, so that we know whether we're on the right track!

    We think that with these changes, this package will be one of the best options out there for building standard-compliant APIs in Laravel. So we could really do with a great website with docs that follow the Laravel docs sub-headings (i.e. so that they are instantly familiar to Laravel developers). If you're able to help out with a public website, let me know.

    feature 
    opened by lindyhopchris 36
  • Support snake case relationships when these are specified

    Support snake case relationships when these are specified

    Hi,

    I was trying to save three belongsTo relationships, but for some reason only the first one would go through; While investing it, I dd'ed here https://github.com/cloudcreativity/laravel-json-api/blob/develop/src/Eloquent/AbstractAdapter.php#L370 and saw that it had fetched the relationship before saving, what's the idea behind this?

    Eg. when trying to save a client_id on a user, this is the $record being passed to persist:

    ....{"client_id":1,"client":{"id":1,"currency":"EUR","name":"client-name"}}.

    It seems like a redundant fetch from the database?

    I also finally found my issue with only some of the relationships being saved, here: https://github.com/cloudcreativity/laravel-json-api/blob/develop/src/Adapter/AbstractResourceAdapter.php#L205

    What's the idea behind Camelizing the method-name, when Laravel famously uses snake-case for relationships?

    The package is absolutely wonderful, but I'll see if I can get a PR in with some documentation.

    Cheers

    bug 
    opened by JapSeyz 36
  • Different URLs for resources with the same resourceType

    Different URLs for resources with the same resourceType

    Hello all,

    My first problem was that I wanted my model Temple had the resource type worship:temple instead of temples or temple. I could finally fix it with some Resolver classes, but I think that should be a lot easier.

    My second problem I could not solve yet. Now, my Temple class is linked to worship:temple, but I also forced to browse to /worship/v1/worship:temple/ instead of /worship/v1/temples/.

    How can I fix this?

    Thanks in advance

    opened by ben221199 35
  • The path to 1.0

    The path to 1.0

    Now that neomerx/json-api is at 1.0 we want to get this library to 1.0 as soon as possible - to give people confidence that the API is stable.

    The recent routing refactor and reducing the number of units per resource type (currently on develop - will be released as 0.8) puts in a lot of pre-1.0 changes that we wanted to do to simplify the package.

    Required 1.0 Features

    • [x] Full support for filtering, paging etc for relationship endpoints - including test helpers. See #22, #23, #27, #77
    • [x] Support with when retrieving single records. See #62
    • [x] Hydrator simplification. See #69
    • [x] Hydrate Eloquent polymorphic relationships. See #35
    • [x] Generic authorizer that hands off to Laravel policies. See #45
    • [x] Refactor JsonApiController so that it has the majority of the workflow that currently exists within EloquentController. Extend the Eloquent controller from this new controller.
    • [x] Add a broadcast helper trait. See #36
    • [x] Add a blade template helper to encode JSON API data into a HTML page. See #36
    • [x] Convert tests to Laravel 5.4 style - i.e. remove dependency on laravel/browser-kit-testing.
    • [x] Drop support for Laravel 5.3 and ensure support for 5.4 and 5.5 at 1.0.
    • [x] Unit tests in this package rather than relying on the demo app to test package is working. ~~Add json-api:cache and json-api:clear commands to cache the ApiInterface object. This will give a performance benefit to HTTP requests along the lines of route:cache.~~

    Required Internal Changes

    • [x] Rename the Resource class as it is a reserved word in PHP 7.0
    • [x] Extract StandardObjectInterface and related generic classes to a separate utility library.
    • [x] Single ValidatorErrorFactoryInterface in the cloudcreativity/json-api package rather than extending that interface in laravel-json-api.
    • [x] Ideally stop injecting HttpServiceInterface and instead inject the ApiInterface and RequestInterface directly. This is possible as long as no services are created post the JSON-API middleware running.

    Opening this issue so that people can comment on any features that they think are needed for 1.0.

    opened by lindyhopchris 30
  • Convert Model to JsonApi object in a custom Controller.

    Convert Model to JsonApi object in a custom Controller.

    Hello, I'd like to know if the package has any way to convert an object model to a json with the jsonapi structure in any controller (not necessarily an Eloquent jsonapi controller).

    Thank you!

    enhancement 
    opened by chrisngabp 23
  • Attach meta to error objects

    Attach meta to error objects

    Hi,

    First of all, thanks for your work on this awesome project..

    I'm current;y investigating the possibility of adding meta information to the attributes validation errors returned when creating/updating resources (as per JSON-API v1.0 specs, https://jsonapi.org/format/#error-objects).

    My use case would be to add a machine-readable description of each validation error, to complement the human-readable one found under "details"... Something like :

    {
        "status": "422",
        "title": "Unprocessable Entity",
        "detail": "The status must be between 1 and 5.",
        "source": {
            "pointer": "/data/attributes/status"
        },
        "meta": {
            "machine_description": {
                "between": [
                    "1",
                    "5"
                ]
            }
        }
    }
    

    With Laravel, calling $validator->failed() returns a pretty decent (when JSON-encoded) machine-readable description of all errors, for example, given the following rules :

    [
     'title' => 'bail|required|string|min:5|max:10',
     'pages' => 'bail|required|numeric',
     'body' => 'required|string|same:title|not_in:foo,bar',
     'else' => 'required',
     'comments' => 'bail|min:3',
     'comments.*.author' => 'bail|required|string',
    ]
    

    and the following attributes :

    {
    	"title": "foo",
    	"pages": "a",
    	"body": "foo",
    	"else": "test"
    }
    

    $validator->failed() would return something like this :

    {
        "title": {
            "min": [
                "5"
            ]
        },
        "pages": {
            "numeric": []
        },
        "body": {
            "notin": [
                "foo",
                "bar"
            ]
        }
    }
    

    Anyway... the actual use of this feature is not important here, my question is simply : it is currently possible to add meta info to error objects? If not, where should I begin to investigate in order to achieve such a thing?

    Maybe a new method (getMeta) could be added to the AbtractValidators class, which would access the validator instance and the error path (source/pointer), the return value being added as meta to the error?

    Thanks for your help...

    enhancement 
    opened by gendronb 20
  • Automatic controller detection by conventions

    Automatic controller detection by conventions

    I'm evaluating the use of this library for a rewrite of our API.During my tests I wanted to create a custom controller and used this:

    $api->resource('model', ['controller' => true]);
    

    What about detecting controllers automatically based on the by-resource setting?

    • trueApp\JsonApi\Model\Controller
    • falseApp\JsonApi\Controllers\ModelController

    What do you think about this? Is it hard to realize?

    question 
    opened by jannis-a 18
  • Adding include, filter, sort... on Related Resource

    Adding include, filter, sort... on Related Resource

    Hi there,

    I'm almost done updating my full application to this library, which btw is simply amazing, only to face a last minute issue. Let me explain. Consider a Post with many Comments.

    Using related resources I can have the following endpoint: /api/posts/{post_id}/comments

    Now I would like to implement pagination on this and I know it is on the path to 1.0, that's awesome news. But I also need to be able to include other resources or apply some filters.

    But the following doesn't work: /api/posts/{post_id}/comments?include=author&filter[title]=hello

    I would have expected that it would be parsed by the Comment Adapter and Validator. I don't see anything in the spec preventing filtering or inclusion on related resources, unless I missed it.

    Sure I could achieve the same result by adding a filter on the comments endpoint: /api/comments?include=author&filter[title]=hello&filter[posts-id]={post_id}

    But that's not how my API is documented and isn't the best way of doing it.

    Is it something which is on the radar? Maybe on the road to 1.0?

    enhancement 
    opened by JeanLucEsser 18
  • [Question] Customize Authorization Exception Response

    [Question] Customize Authorization Exception Response

    I am working with passport scopes to authenticate specific actions. First of all, I ran into the issue that the scope middleware, provided by passport, does not play nicely with the json-api. For Example $api->resource('my-resource')->only('index')->middleware('scope:my-resource:index'); only returns a 500 internal server error instead of the 403 with details on the missing scope. As an alternative, I'd like to move the logic from the routes file to the authorizer. Unfortunately, I don't see any possibility to customize the response error text for the authorization exception, since the api only returns {"title": "Unauthenticated"} along with the 403 response code.

    Is there any possibility to customize the response like "You need scope XY to access this resource"?

    enhancement 
    opened by lucianholt97 17
  • Class json-api does not exist

    Class json-api does not exist

    Hi. i'm trying upgrade rc2 to 1.1 and all time i seeing message "Class json-api does not exist", so Facade can't be loaded Maybe i should load custom service provider somewhere or i hand't done something at configs? P.S. app namespace isnt 'App/', but i changed 'namespace' in the config file P.P.S. Maybe i should add 'CloudCreativity\LaravelJsonApi\ServiceProvider::class,' to providers ? but didn't see it at the dummy app

    opened by rekrios 17
  • Insert on duplicate key upd  when inserting a record?

    Insert on duplicate key upd when inserting a record?

    Hi! This POST-request create row in many-to-many table:

    {
      "data": {
        "type": "legal-entity-warehouse-days",
        "attributes": {
        },
        "relationships": {
          "legal-entity-warehouse": {
            "data": {
              "id": "8",
              "type": "legal-entity-warehouses"
            }
          },
          "warehouse-day": {
            "data": {
              "id": "1",
              "type": "warehouse-days"
            }
          }
        }
      }
    }
    

    In table legal-entity-warehouse-days has unique key (legal_entity_warehouse_id - warehouse_day_id).

    If you send a post request several times, there will be an error duplicating a unique composite key.

    How to fix it?

    opened by Vasiliy-Makogon 6
  • Make a request to one endpoint from another controller

    Make a request to one endpoint from another controller

    Hello, How do i make a request to one resource endpoint without using an http client? Here is my problem I have create a controller to update the current user informations. I have a users ressource configured. When i try to create a request like this and pass it to the app()->handle() functions the request fails with a 500 error :

    $request = Request::create( '/api/v1/users/1', 'POST', $data, ); $response = app()->handle($request);

    is there a way to call a ressource controller action without using an $httpClient?

    opened by hymenoby 5
  • Migrate from cloudcreativity/laravel-json-api to laravel-json-api/laravel

    Migrate from cloudcreativity/laravel-json-api to laravel-json-api/laravel

    I want to migrate from cloudcreativity/laravel-json-api to laravel-json-api/laravel.

    I have too much code that I don't want to migrate when starting a new laravel project. Can I install both libraries in one project?

    I have a problem with one dependency library that is different version laravel-json-api/encoder-neomerx

    • ^1.0 in cloudcreativity/laravel-json-api
    • ^2.0 in laravel-json-api/laravel
    Problem 1
        - laravel-json-api/laravel[v2.0.0, ..., 2.x-dev] require laravel-json-api/encoder-neomerx ^2.0 -> satisfiable by laravel-json-api/encoder-neomerx[v2.0.0, 2.x-dev].
        - laravel-json-api/encoder-neomerx[v2.0.0, ..., 2.x-dev] require laravel-json-api/neomerx-json-api ^5.0 -> satisfiable by laravel-json-api/neomerx-json-api[v5.0.0, 5.x-dev].
        - You can only install one version of a package, so only one of these can be installed: laravel-json-api/neomerx-json-api[v1.1.0, v1.x-dev, v5.0.0, 5.x-dev].
        - cloudcreativity/laravel-json-api[v4.0.0, ..., 4.x-dev] require laravel-json-api/neomerx-json-api ^1.1 -> satisfiable by laravel-json-api/neomerx-json-api[v1.1.0, v1.x-dev].
        - Root composer.json requires cloudcreativity/laravel-json-api ^4.0 -> satisfiable by cloudcreativity/laravel-json-api[v4.0.0, 4.x-dev].
        - Root composer.json requires laravel-json-api/laravel ^2.0 -> satisfiable by laravel-json-api/laravel[v2.0.0, v2.1.0, 2.x-dev].
    

    @lindyhopchris Is there a possibility that this will happen?

    opened by veneliniliev 14
  • How to attach a middleware to a specific resource relationship?

    How to attach a middleware to a specific resource relationship?

    Given something like:

    $api->resource('foo')
      ->relationships(static function (RelationshipsRegistration $relations) {
        $relations->hasOne('bar');
        $relations->hasOne('fizz');
        $relations->hasMany('buzz');
      })
      ->middleware('example');
    

    How can I specify a middleware for the buzz relationship independent of bar and fizz (and the main resource)? Something akin to this is what I'm looking to do:

    $api->resource('foo')
      ->relationships(static function (RelationshipsRegistration $relations) {
        $relations->hasOne('bar');
        $relations->hasOne('fizz')->middleware('cache.headers:public;max_age=604800');
        $relations->hasMany('buzz');
      })
      ->middleware('cache.headers:public;max_age=600');
    

    On that same topic, is there a way to setup different middleware per resource endpoint? I'd like to be able to target the index separately from the individual item. I have a workaround where I split out the resource into multiple definitions using ->only('index') but it seems clunky.

    opened by swichers 3
  • Multiple primary keys - Mysql Error

    Multiple primary keys - Mysql Error

    When I have a model with multiple primary keys I get a SQL error.

    
    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as `` asc limit 5 offset 0' at line 1 at /var/www/v2/laravel/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:79)
    [stacktrace]
    
    
    opened by mikoop79 1
Owner
Cloud Creativity
Creative cloud solutions
Cloud Creativity
Best resources restful api for developers (with JSON:API standar specification design)

List API Best resources restful api for developers (with JSON:API standar specification design). API Resource Endpoint Name Resource Description Al Qu

Noval 2 Jan 18, 2022
Laravel API 文档生成器,可以将基于 Laravel 项目的项目代码,自动生成 json 或 md 格式的描述文件。

Thresh Laravel API 文档生成器,可以将基于 Laravel 项目的项目代码,自动生成 json 或 md 格式的描述文件。 安装 $ composer require telstatic/thresh -vvv 功能 生成 Markdown 文档 生成 Postman 配置文件 生

静止 5 Jul 12, 2021
The efficient and elegant JSON:API 1.1 server library for PHP

Woohoo Labs. Yin Woohoo Labs. Yin is a PHP framework which helps you to build beautifully crafted JSON:APIs. Table of Contents Introduction Features W

Woohoo Labs. 237 Nov 28, 2022
The efficient and elegant, PSR-7 compliant JSON:API 1.1 client library for PHP

Woohoo Labs. Yang Woohoo Labs. Yang is a PHP framework which helps you to communicate with JSON:API servers more easily. Table of Contents Introductio

Woohoo Labs. 160 Oct 16, 2022
JSON:API serializer for PHP resources

kwai-jsonapi A JSON:API serializer for PHP classes using PHP attributes. Currently, this library has no support for links. Installation composer requi

Franky Braem 1 Jan 19, 2022
The 1Password Connect PHP SDK provides your PHP applications access to the 1Password Connect API hosted on your infrastructure and leverage the power of 1Password Secrets Automation

1Password Connect PHP SDK The 1Password Connect PHP SDK provides your PHP applications access to the 1Password Connect API hosted on your infrastructu

Michelangelo van Dam 12 Dec 26, 2022
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
Quickly and easily expose Doctrine entities as REST resource endpoints with the use of simple configuration with annotations, yaml, json or a PHP array.

Drest Dress up doctrine entities and expose them as REST resources This library allows you to quickly annotate your doctrine entities into restful res

Lee Davis 88 Nov 5, 2022
pedre-response is a standard structure of json response

PedreResponse It's very important to use same structure for responses in large projects that PedreResponse package can do it for you. PedreResponse is

Pedram Rezaei 2 Dec 22, 2021
PHP implementation of JSON schema. Fork of the http://jsonschemaphpv.sourceforge.net/ project

JSON Schema for PHP A PHP Implementation for validating JSON Structures against a given Schema with support for Schemas of Draft-3 or Draft-4. Feature

Justin Rainbow 3.4k Dec 26, 2022
Read and write OpenAPI 3.0.x YAML and JSON files and make the content accessible in PHP objects.

php-openapi Read and write OpenAPI 3.0.x YAML and JSON files and make the content accessible in PHP objects. It also provides a CLI tool for validatin

Carsten Brandt 399 Dec 23, 2022
A robust JSON decoder/encoder with support for schema validation.

A robust wrapper for json_encode()/json_decode() that normalizes their behavior across PHP versions, throws meaningful exceptions and supports schema validation by default.

Bernhard Schussek 356 Dec 21, 2022
Like FormRequests, but for validating against a json-schema

JSON Schema Request Laravels Form Request Validation for JSON Schema documents Installation composer require wt-health/laravel-json-schema-request Us

Webtools Health 1 Feb 3, 2022
An easy to use Fractal wrapper built for Laravel and Lumen applications

An easy to use Fractal wrapper built for Laravel and Lumen applications The package provides a nice and easy wrapper around Fractal for use in your La

Spatie 1.8k Dec 30, 2022
An Unleash bundle for Symfony applications to provide an easy way to use feature flags

Unleash Bundle An Unleash bundle for Symfony applications. This provide an easy way to implement feature flags using Gitlab Feature Flags Feature. Ins

Stogon 7 Oct 20, 2022
Class helpers for Symfony applications

Micro-Symfony Tools Class helpers for Symfony applications. Installation composer require yceruto/micro-symfony Micro-Bundle Bundles are a very impor

Yonel Ceruto 4 Sep 23, 2022
A Laravel Fractal package for building API responses, giving you the power of Fractal with Laravel's elegancy.

Laravel Responder is a package for building API responses, integrating Fractal into Laravel and Lumen. It can transform your data using transformers,

Alexander Tømmerås 776 Dec 25, 2022
Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.

Laravel API tool kit and best API practices Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using lar

Ahmed Esa 106 Nov 22, 2022
A RESTful API package for the Laravel and Lumen frameworks.

The Dingo API package is meant to provide you, the developer, with a set of tools to help you easily and quickly build your own API. While the goal of

null 9.3k Jan 7, 2023