Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/litto/pagination
Pagination for PHP project
https://github.com/litto/pagination
Last synced: about 2 months ago
JSON representation
Pagination for PHP project
- Host: GitHub
- URL: https://github.com/litto/pagination
- Owner: litto
- Created: 2022-02-07T08:15:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-07T08:27:03.000Z (almost 3 years ago)
- Last Synced: 2024-05-04T14:03:35.373Z (8 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pagination Library
Pagination for PHP project## How to Install?
You can install it via composer by typing:-
composer require litto/pagination:v1.0
## How it Works?
After fetching records, Pass values through this
getPages($current,$cnt,$limit);
$first = $pg->getFirst($cnt,$limit);
$last = $pg->getLast($cnt,$limit);
$prev = $pg->getPrev($current,$cnt,$limit);
$next = $pg->getNext($current,$cnt,$limit);?>
Here $totalRecords signifies total records count
$limit the limit count of trecords to display
After passing these values to Pages Function, this class will auto assign pages, first, last, prev next varibles which enable pagination to functionAnd in Page links Just put like:-
####
Now your paginations Links are generated