Package for getting pagination buttons from laravel framework
art-es/laravel-pagination-buttons is a Laravel package for package for getting pagination buttons from laravel framework.
It currently has 1 GitHub stars and 1 downloads on Packagist (latest version 1.0.0).
Install it with composer require art-es/laravel-pagination-buttons.
Discover more Laravel packages by art-es
or browse all Laravel packages to compare alternatives.
Last updated
composer require art-es/laravel-pagination-buttons
Get pagination buttons.
$buttons = \Artes\Pagination\Pagination::execute($pages, $currentPage);
currentPage is not required argument, default getting param page from Request.
Callback is \Illuminate\Support\Collection object.
It is foreachable object.
You can use
@foreach ($buttons as $button)
<a href="{{ route('some.route', ['page' => $button->page]) }}"
class="{{ $button->active ? 'active' : '' }}">
{{ $button->label }}
</a>
@endforeach
The MIT License (MIT). Please see License File for more information.