PHPackages                             landish/pagination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. landish/pagination

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

landish/pagination
==================

Laravel 5 Custom Pagination Presenter

1.3.3(9y ago)113213.6k↓35%22MITPHP

Since Mar 28Pushed 8y ago5 watchersCompare

[ Source](https://github.com/Landish/Pagination)[ Packagist](https://packagist.org/packages/landish/pagination)[ RSS](/packages/landish-pagination/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (11)Used By (0)

Landish/Pagination
==================

[](#landishpagination)

> Note: Works with only **5.0**, **5.1** and **5.2** versions. **5.3** and above it does **not** work. PR's welcome!

[![Build Status](https://camo.githubusercontent.com/cee94659d8b5e070b8d06ada21cf8ade1b8b5ea3ff97428d634a6000670528b9/68747470733a2f2f7472617669732d63692e6f72672f4c616e646973682f506167696e6174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Landish/Pagination)[![Latest Stable Version](https://camo.githubusercontent.com/e3cd22a29641aeb69f17c5f2cfae39a3e20b67865cc96bb1b71ab925f788dce2/68747470733a2f2f706f7365722e707567782e6f72672f6c616e646973682f706167696e6174696f6e2f762f737461626c65)](https://packagist.org/packages/landish/pagination)[![Total Downloads](https://camo.githubusercontent.com/e274854202bd001e3b25facf5fc4e592a8821b073459aecb6aa7c2f353f2973d/68747470733a2f2f706f7365722e707567782e6f72672f6c616e646973682f706167696e6174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/landish/pagination)[![Latest Unstable Version](https://camo.githubusercontent.com/e52880f8762c598cee0ed1e04bde227e2650bae389fee4e5541c51175a2561a9/68747470733a2f2f706f7365722e707567782e6f72672f6c616e646973682f706167696e6174696f6e2f762f756e737461626c65)](https://packagist.org/packages/landish/pagination)[![License](https://camo.githubusercontent.com/43da1bd3cb20d074b2622caf7164c87adcfa3280bcc3ee30b9581af8aae1a81f/68747470733a2f2f706f7365722e707567782e6f72672f6c616e646973682f706167696e6174696f6e2f6c6963656e7365)](https://packagist.org/packages/landish/pagination)

[Laravel 5](http://laravel.com/) comes with [Pagination](http://laravel.com/docs/pagination) class, which is perfectly rendered to match [Bootstrap 3](http://getbootstrap.com/components/#pagination) styles.

This package gives you ability to change the display output of rendered pagination elements for Front-end Frameworks, such as: [Semantic UI](http://semantic-ui.com/collections/menu.html#pagination), [Zurb Foundation](http://foundation.zurb.com/docs/components/pagination.html), [UIKit](http://getuikit.com/docs/pagination.html) and [Materialize](http://materializecss.com/).

With this package it is also very easy to [create custom pagination](#create-custom-pagination) HTML output.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Usage - Recommended Way](#usage---recommended-way)
- [Simple Pagination](#simple-pagination)
- [Additional Wrappers](#additional-wrappers)
- [Appending To Pagination Links](#appending-to-pagination-links)
- [Create Custom Pagination](#create-custom-pagination)
- [License](#license)

Installation
------------

[](#installation)

To install `landish/pagination` package, you have to run the following command in your Terminal, or Comand Promt:

```
$ composer require landish/pagination

```

Or manually add the following lines in to your `composer.json` file:

```
"require": {
    "landish/pagination": "~1.0"
}
```

and run the `composer update` or `composer install` command.

Usage
-----

[](#usage)

Add following lines of code in your `*.blade.php` file, where you want to dispay the pagination.

For [Semantic UI](http://semantic-ui.com/):

```
{!! (new Landish\Pagination\SemanticUI($items))->render() !!}
// or add "\Simple" in namespace for "Simple Pagination"
{!! (new Landish\Pagination\Simple\SemanticUI($items))->render() !!}
```

For [Zurb Foundation](http://foundation.zurb.com/):

```
{!! (new Landish\Pagination\ZurbFoundation($items))->render() !!}
// or add "\Simple" in namespace for "Simple Pagination"
{!! (new Landish\Pagination\Simple\ZurbFoundation($items))->render() !!}
```

For [UIKit](http://getuikit.com/):

```
{!! (new Landish\Pagination\UIKit($items))->render() !!}
// or add "\Simple" in namespace for "Simple Pagination"
{!! (new Landish\Pagination\Simple\UIKit($items))->render() !!}
```

For [Materialize](http://materializecss.com/) (Contributed by [@arandilopez](https://github.com/arandilopez)):

```
{!! (new Landish\Pagination\Materialize($items))->render() !!}
// or add "\Simple" in namespace for "Simple Pagination"
{!! (new Landish\Pagination\Simple\Materialize($items))->render() !!}
```

Usage - Recommended Way
-----------------------

[](#usage---recommended-way)

If you display pagination on several pages of your web application and have to write to the output code in several files, then this is, what I would recommend to do:

Just create `Pagination.php` file in your `/app/` directory and paste the following code:

> **Note:** This example is suitable for you, if you haven't change the [Laravel Application Namespace](http://laravel.com/docs/5.0/structure#namespacing-your-application), otherwise just use your custom namespace instead of `App`.

```
