diff --git a/README.md b/README.md index 74fa6f4..0666ec0 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ methods: { } } ``` -`this.data` object must be Laravel Pagination object. +`this.data` object must be Laravel default or API Resource Pagination object. ##### Example: ```javascript { @@ -62,6 +62,38 @@ methods: { total: 200 } ``` +or +```javascript +{ + "data": [ + { + "id": 1, + "name": "Eladio Schroeder Sr.", + "email": "therese28@example.com", + }, + { + "id": 2, + "name": "Liliana Mayert", + "email": "evandervort@example.com", + } + ], + "links":{ + "first": "http://example.com/pagination?page=1", + "last": "http://example.com/pagination?page=1", + "prev": null, + "next": null + }, + "meta":{ + "current_page": 1, + "from": 1, + "last_page": 1, + "path": "http://example.com/pagination", + "per_page": 15, + "to": 10, + "total": 10 + } +} +``` ## Customizations diff --git a/package.json b/package.json index 295bc25..169b66d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-laravel-paginex", - "version": "1.1.1", + "version": "2.0.0", "description": "Laravel Pagination with VueJS (customizable)", "main": "src/Pagination.vue", "repository": { diff --git a/src/Pagination.vue b/src/Pagination.vue index 1f72674..b0b191e 100755 --- a/src/Pagination.vue +++ b/src/Pagination.vue @@ -15,14 +15,6 @@ \ No newline at end of file