SHARE
TWEET

Untitled

a guest Nov 9th, 2019 62 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 = array_chunk($params, $limit);
  5.         $totalPage = count($pagData);
  6.         $result = $pagData[$currentPage - 1];
  7.         return ['currentPage' => $currentPage, 'totalPage' => $totalPage, 'data' => $result];
  8.     }
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