Paginates the array.
public paginate ( integer $maxPerPage, integer $initialPage = 1, string $key = null ) : array | ||
$maxPerPage | integer | Max items per page. If this value is minor than 1 the result will be an empty array |
$initialPage | integer | Initial page. Page 1 by default |
$key | string | Element to paginate using "dot" notation |
return | array | A list of pages with an array of elements associated with each page |