Download the PHP package anxis/laravel-json-api-resource without Composer
On this page you can find all versions of the php package anxis/laravel-json-api-resource. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anxis/laravel-json-api-resource
More information about anxis/laravel-json-api-resource
Files in anxis/laravel-json-api-resource
Package laravel-json-api-resource
Short Description Laravel JSON API Resource
License MIT
Homepage https://github.com/kharysharpe/laravel-json-api-resource
Informations about the package laravel-json-api-resource
Overview
This is potentially a drop in replacement for Laravel API Resource that produces JSON API response as per specification. (https://jsonapi.org/).
* Needs refactoring and tests, pull requests welcomed.
Installation
You can install the package via composer:
Usage
Pre-made example https://github.com/kharysharpe/laravel-json-api-resource-example
From scratch
routes/api.php
app/Http/Controllers/UserController.php
OR
app/Http/Resource/UserResource.php
app/Http/Resource/UserCollection.php
Prepare the database (Don't forget to add data to the user table)
Start your laravel application
Visit
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
TODO
- Add credits and/or references
- Look at using https://github.com/spatie/laravel-json-api-paginate to fix pagination
Credits
- Khary Sharpe
- All Contributors
License
The MIT License (MIT). Please see License File for more information.