Skip to content

Commit

Permalink
✨ add properties for first and last item of a page
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Feb 22, 2019
1 parent 464458e commit f261f45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MetApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ protected function paginate($collection,$perpage=15) {
'last_page' => $collection->lastPage(),
'next_page_url' => $collection->nextPageUrl(),
'prev_page_url' => $collection->previousPageUrl(),
'first_item' => $paginator->getCurrentPageFirstItem(),
'last_item' => $paginator->getCurrentPageLastItem(),
'pages' => $pages,
]);

Expand Down

0 comments on commit f261f45

Please sign in to comment.