Last active
September 6, 2017 09:33
-
-
Save developerdino/db302c81620e0c4b3ba74327ace17594 to your computer and use it in GitHub Desktop.
Using Laravel 5.5 Resources to create your own {JSON:API} formatted API - Medium Gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "links": { | |
| "self": "http://example.com/articles", | |
| "first": "http://example.com/articles?page=1", | |
| "last": "http://example.com/articles?page=2", | |
| "prev": null, | |
| "next": "http://example.com/articles?page=2" | |
| }, | |
| "data": [ | |
| { | |
| "type": "articles", | |
| "id": "1", | |
| "attributes": { | |
| "title": "JSON API paints my bikeshed!" | |
| }, | |
| "links": { | |
| "self": "http://example.com/api/articles/1" | |
| } | |
| }, | |
| { | |
| "type": "articles", | |
| "id": "2", | |
| "attributes": { | |
| "title": "Build APIs You Won't Hate" | |
| }, | |
| "links": { | |
| "self": "http://example.com/api/articles/2" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment