PHPackages                             anxis/laravel-json-api-resource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. anxis/laravel-json-api-resource

ActiveLibrary

anxis/laravel-json-api-resource
===============================

Laravel JSON API Resource

v1.2.2(5y ago)072MITPHPPHP ^7.1

Since Jul 20Pushed 5y agoCompare

[ Source](https://github.com/adrianoanschau/laravel-json-api-resource)[ Packagist](https://packagist.org/packages/anxis/laravel-json-api-resource)[ Docs](https://github.com/kharysharpe/laravel-json-api-resource)[ RSS](/packages/anxis-laravel-json-api-resource/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (21)Used By (0)

Overview
========

[](#overview)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0cf2ade77a895a7ec95da76bdb8a9132f83355707d02c8d7c56ac710bd2adec1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b686172797368617270652f6c61726176656c2d6a736f6e2d6170692d7265736f757263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kharysharpe/laravel-json-api-resource)[![Build Status](https://camo.githubusercontent.com/d0a3a1ff40ff99de3e97eb6b3a24f8fbdf1d57f0e444dcfd9a5eab1086d6f8d5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b686172797368617270652f6c61726176656c2d6a736f6e2d6170692d7265736f757263652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/kharysharpe/laravel-json-api-resource)[![Quality Score](https://camo.githubusercontent.com/6f0eff35802993525200806577de6c8baa55cfa474e201e8336960d012cc0639/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b686172797368617270652f6c61726176656c2d6a736f6e2d6170692d7265736f757263652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kharysharpe/laravel-json-api-resource)[![Total Downloads](https://camo.githubusercontent.com/147ab9ac273747b249b3904756442f44617c819f826c253c3d7ead0393f7d73a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b686172797368617270652f6c61726176656c2d6a736f6e2d6170692d7265736f757263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kharysharpe/laravel-json-api-resource)

This is potentially a drop in replacement for Laravel API Resource that produces JSON API response as per specification. ().

\* Needs refactoring and tests, pull requests welcomed.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kharysharpe/laravel-json-api-resource
```

Usage
-----

[](#usage)

Pre-made example

From scratch

```
laravel new json-server
cd json-server
composer require kharysharpe/laravel-json-api-resource

```

routes/api.php

```
