LaravelPackages.net
Acme Inc.
Toggle sidebar
sebastiansulinski/laravel-pagination

Custom pagination wrapper for Laravel 5 with form Select and Zurb Foundation implementations.

565
1
v1.1.1
About sebastiansulinski/laravel-pagination

sebastiansulinski/laravel-pagination is a Laravel package for custom pagination wrapper for laravel 5 with form select and zurb foundation implementations.. It currently has 1 GitHub stars and 565 downloads on Packagist (latest version v1.1.1). Install it with composer require sebastiansulinski/laravel-pagination. Discover more Laravel packages by sebastiansulinski or browse all Laravel packages to compare alternatives.

Last updated

Laravel 5 pagination wrapper

Custom pagination wrapper with Form Select and Zurb Foundation implementations.

Preview

Desktop

Pagination on Desktop

Smart Phone

Pagination on Smart Phone


Select functionality

For the select to work with the pagination - you can use sebastiansulinski/ssd-select and bind its go-to action with our select element somewhere from within your JavaScript files:

$('.select-pagination select').ssdSelect({
    action: 'go-to'
});

Usage

From within your controller's method use the pagination() method as you would with the default pagination.

public function index()
{
    $collection = Product::latest()->paginate(12);

    return $this->view('product.index', compact('collection'));
}

In the view wrap the collection with one of the pagination wrappers

{!! (new \SSD\Pagination\Select($collection))->render() !!}

or

{!! (new \SSD\Pagination\Foundation($collection))->render() !!}

To center pagination on the page use the div with class pagination-center (this will only work if you used the attached scss file to render your styles)

<div class="pagination-center">
    {!! (new \SSD\Pagination\Select($collection))->render() !!}
</div>
<div class="pagination-center">
    {!! (new \SSD\Pagination\Foundation($collection))->render() !!}
</div>
Comments