Package Data | |
---|---|
Maintainer Username: | egeriis |
Maintainer Contact: | ronni@egeriis.me (Ronni Egeriis Persson) |
Package Create Date: | 2014-07-22 |
Package Last Update: | 2016-11-18 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 15:02:35 |
Package Statistics | |
---|---|
Total Downloads: | 12,892 |
Monthly Downloads: | 11 |
Daily Downloads: | 0 |
Total Stars: | 146 |
Total Watchers: | 6 |
Total Forks: | 27 |
Total Open Issues: | 6 |
!!! Project abandoned. See cloudcreativity/laravel-json-api for a great alternative.
Make it a breeze to create a jsonapi.org compliant API with Laravel 5.
This library strives to be up to date with the latest JSON API updates—as the spec is still a work in progress. If you notice that something is missing, please contribute!
Add echo-it/laravel-jsonapi
to your composer.json dependency list (version 2.0.0 at the minimum for laravel 5 support)
Run composer update
.
This library is made with the concept of exposing models in mind, as found in the RESTful API approach.
In few steps you can expose your models:
Create a route to direct the requests
In this example, we use a generic route for all models and HTTP methods:
Route::any('{model}/{id?}', 'ApiController@handleRequest');
Create your controller to handle the request
Your controller is responsible to handling input, instantiating a handler class and returning the response.