Package Data | |
---|---|
Maintainer Username: | sebastiansulinski |
Maintainer Contact: | info@ssdtutorials.com (Sebastian Sulinski) |
Package Create Date: | 2015-10-20 |
Package Last Update: | 2016-04-04 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-24 15:01:54 |
Package Statistics | |
---|---|
Total Downloads: | 564 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Custom pagination wrapper with Form Select and Zurb Foundation implementations.
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'
});
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>