Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.07 KB

README.md

File metadata and controls

53 lines (40 loc) · 1.07 KB

Easy Paginator

Simple generate paginate custom Laravel, with any array. When not possible use standard pagination of eloquent methods use this package.

Installation

Installation by composer require

composer require firmino/easy-paginator 

Installation manually, add in file composer.json

{
    "require": {
        "firmino/easy-paginator": "1.0.9"
    }
}

Configuration laravel 5.5+

Laravel's package discovery will take care of integration for you.

Configuration laravel <5.5

Add the following settings to your app.php file.

'providers' => array(
    //...
    Firmino\EasyPaginator\Providers\EasyPaginatorServiceProvider::class,
),

and add aliases

'EasyPaginator' => Firmino\EasyPaginator\Facades\EasyPaginator::class

Usage

Import Facade

use EasyPaginator;

// Array $items - data to generation paginate
// int $itemsCount - length array data
// int $perPage - amount of items per page
// int $currentPage - page current to show data
EasyPaginator::paginate($items, $itemsCount, $perPage, $currentPage);