From f261f45f5f1057537e509371afcf019d2d87a232 Mon Sep 17 00:00:00 2001 From: kevin olson Date: Thu, 21 Feb 2019 23:39:52 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20properties=20for=20first=20an?= =?UTF-8?q?d=20last=20item=20of=20a=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MetApiController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MetApiController.php b/src/MetApiController.php index e86b115..ec257ea 100644 --- a/src/MetApiController.php +++ b/src/MetApiController.php @@ -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, ]);