Download the PHP package mrshanebarron/pagination without Composer
On this page you can find all versions of the php package mrshanebarron/pagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mrshanebarron/pagination
More information about mrshanebarron/pagination
Files in mrshanebarron/pagination
Download mrshanebarron/pagination
More information about mrshanebarron/pagination
Files in mrshanebarron/pagination
Vendor mrshanebarron
Package pagination
Short Description Pagination component for Laravel - supports Livewire and Vue
License MIT
Package pagination
Short Description Pagination component for Laravel - supports Livewire and Vue
License MIT
Please rate this library. Is it a good library?
Informations about the package pagination
Pagination
A pagination component for Laravel applications. Displays page numbers with navigation controls. Works with Livewire and Vue 3.
Installation
Livewire Usage
Basic Usage
With Item Count
Livewire Props
| Prop | Type | Default | Description |
|---|---|---|---|
wire:model |
number | 1 |
Current page number |
total-pages |
number | required | Total number of pages |
per-page |
number | 10 |
Items per page |
total |
number | 0 |
Total item count |
on-each-side |
number | 2 |
Pages shown on each side |
show-info |
boolean | true |
Show "Showing X to Y of Z" |
Vue 3 Usage
Setup
Basic Usage
With Results Info
Data Table Example
Custom Visible Pages
Vue Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue |
Number | 1 |
Current page (v-model) |
totalPages |
Number | required | Total page count |
perPage |
Number | 10 |
Items per page (for info) |
total |
Number | 0 |
Total items (for info) |
onEachSide |
Number | 2 |
Visible pages each side |
showInfo |
Boolean | true |
Show results info text |
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue |
number |
Emitted when page changes |
Features
- Page Numbers: Shows current page with neighbors
- Ellipsis: Shows
...for skipped ranges - First/Last: Always shows first and last page
- Navigation: Previous/next buttons
- Results Info: "Showing X to Y of Z results"
Page Display Logic
With onEachSide: 2 and 20 total pages:
- Page 1:
1 2 3 ... 20 - Page 5:
1 ... 3 4 5 6 7 ... 20 - Page 20:
1 ... 18 19 20
Styling
Uses Tailwind CSS:
- White buttons with border
- Blue background for current page
- Disabled state for first/last page
- Hover effects
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x
License
MIT License
All versions of pagination with dependencies
PHP Build Version
Package Version
The package mrshanebarron/pagination contains the following files
Loading the files please wait ...