Download the PHP package drpdigital/laravel-json-api-parser without Composer

On this page you can find all versions of the php package drpdigital/laravel-json-api-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-json-api-parser

JSON API parser for Laravel

Build Status Coverage Status GitHub Releases License

This is a Laravel framework integration for the JSON API parser.

The JSON API parser allows you to read and validate requests that are structured with the jsonapi.org specification.

Version compatibility

JSON API Parser version Laravel Version PHP Version
1.X 5.1 - 5.6 >= 5.6

Installation

You install the package by using composer:

If you are using Laravel 5.5 onwards the package will automatically register itself.

If you are on Laravel 5.4 or lower then you will need to register the service provider in your config/app.php

Documentation

How to validate your resources

When wanting to validate a resource within your payload, you need to give the JsonApiValidator a ValidatorExecutor. This can be done in a few ways specified below. With all of these the first parameter is a string of the type of resource it needs to validate.

So for example if you had a request like:

Then your first parameter would be 'user'.

Using ::make

The rules and messages you provide are whatever Laravel can support as our validator is just a decorated for Laravel's.

Using custom class

When using a custom validator class you will need to extend our validator class \Drp\LaravelJsonApiParser\Validation\Validator. You then specify a rules and messages function inside the class and return an array of rules and messages in their respective functions.

How to resolve your resources into Models

For more documentation on how to use the JSON API parser please visit the base package's repository.

Sample Usage

The request:

The handler:

Contributing

Raise any issues or feature requests within GitHub and please follow our guidelines when contributing.

If you have found a security vulnerability with the package please email Chris directly at [email protected]

License

The Laravel JSON API Parser integration and it's base package are both realted under the [MIT License].


All versions of laravel-json-api-parser with dependencies

PHP Build Version
Package Version
Requires drpdigital/json-api-parser Version ^0.0
illuminate/validation Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*
illuminate/support Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*
illuminate/container Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package drpdigital/laravel-json-api-parser contains the following files

Loading the files please wait ....