$pagination
The $pagination
object divides a collection of pages, files etc.
-
new Pagination()
-
$pagination->clone()
-
$pagination->end()
-
$pagination->firstPage()
-
$pagination->firstPageUrl()
-
Pagination::for()
-
$pagination->hardcopy()
-
$pagination->hasNextPage()
-
$pagination->hasPage()
-
$pagination->hasPages()
-
$pagination->hasPrevPage()
-
$pagination->isFirstPage()
-
$pagination->isLastPage()
-
$pagination->lastPage()
-
$pagination->lastPageUrl()
-
$pagination->limit()
-
$pagination->nextPage()
-
$pagination->nextPageUrl()
-
$pagination->offset()
-
$pagination->page()
-
$pagination->pageUrl()
-
$pagination->pages()
-
$pagination->prevPage()
-
$pagination->prevPageUrl()
-
$pagination->range()
-
$pagination->rangeEnd()
-
$pagination->rangeStart()
-
$pagination->start()
-
$pagination->toArray()
-
$pagination->total()
How to create a $pagination
object
To create a $pagination
object, you have to paginate a collection of pages and then call the pagination()
method:
This will give us 5 articles per pagination page.
Example
With the object in place, we can now use the methods to create our pagination navigation
Pagination
When a list of pages grows longer and longer you need to paginate it.