Skip to content

art-es/laravel-pagination-buttons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Pagination Buttons

Installation

composer require art-es/laravel-pagination-buttons

Usage

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

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages