Download the PHP package delight-im/pagination without Composer
On this page you can find all versions of the php package delight-im/pagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download delight-im/pagination
More information about delight-im/pagination
Files in delight-im/pagination
Package pagination
Short Description Helps partition items across pages and generates sets of convenient controls for navigation
License MIT
Homepage https://github.com/delight-im/PHP-Pagination
Informations about the package pagination
PHP-Pagination
Helps partition items across pages and generates sets of convenient controls for navigation
Requirements
- PHP 5.6.0+
Installation
-
Include the library via Composer [?]:
- Include the Composer autoloader:
Usage
Creating an instance
If you don’t specify the current page explicitly in the third argument, it will be auto-detected from the page
or p
query parameters, if available.
Displaying a pagination bar
Simple HTML
Bootstrap front-end framework
Instead of Pagination#toHtmlForBootstrap5
, you can also call Pagination#toHtmlForBootstrap4
or Pagination#toHtmlForBootstrap3
with the same method signature.
Custom HTML
First, generate an array of PaginationElement
objects:
Then turn these PaginationElement
objects into custom HTML:
Adjusting database queries
You can use these two values in your database queries, for example like this:
Contributing
All contributions are welcome! If you wish to contribute, please create an issue first so that your feature, problem or question can be discussed.
License
This project is licensed under the terms of the MIT License.