The Pagination Component
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
src
tests
.gitattributes
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

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]