SHARE
TWEET

Untitled

a guest Nov 9th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    private function paginate($limit, $params = [], $page)
  2.     {
  3.         $currentPage = (isset($page) ? intval($page) : 1);
  4.         $pagData = collect($params)->chunk($limit);
  5.         $result = $pagData[$currentPage - 1]->toArray();
  6.         return ['currentPage' => $currentPage, 'totalPage' => $pagData->count(), 'data' => $result];
  7.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top