Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (23 sloc) 1.12 KB

Pagination

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

The Pagination Component.

Example

<?php

use miBadger\Pagination\Pagination;

/**
 * Create a new pagination object with 10 items and 3 items per page.
 */
$pagination = new Pagination([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3);

/**
 * Returns the items on page 0.
 */
$pagination->get(0); // [1, 2, 3]

/**
 * Returns the items on page 1.
 */
$pagination->get(1); // [4, 5, 6]
You can’t perform that action at this time.