LengthAwarePaginator
interface LengthAwarePaginator implements Paginator
Methods
Add a set of query string values to the paginator.
Get / set the URL fragment to be appended to URLs.
Render the paginator using a given view.
Create a range of pagination URLs.
Determine the total number of items in the data store.
Get the page number of the last available page.
Details
in
Paginator at line 21
string
url(int $page)
Get the URL for a given page.
in
Paginator at line 28
Paginator
appends(array|int|string|null $key, array|bool|float|int|string|null $value = null)
Add a set of query string values to the paginator.
in
Paginator at line 38
Paginator|string|null
fragment(string|null $fragment = null)
Get / set the URL fragment to be appended to URLs.
in
Paginator at line 45
Paginator
withQueryString()
Add all current query string values to the paginator.
in
Paginator at line 50
string|null
nextPageUrl()
The URL for the next page, or null.
in
Paginator at line 55
string|null
previousPageUrl()
Get the URL for the previous page, or null.
in
Paginator at line 62
array
items()
Get all of the items being paginated.
in
Paginator at line 67
int|null
firstItem()
Get the "index" of the first item being paginated.
in
Paginator at line 72
int|null
lastItem()
Get the "index" of the last item being paginated.
in
Paginator at line 77
int
perPage()
Determine how many items are being shown per page.
in
Paginator at line 82
int
currentPage()
Determine the current page being paginated.
in
Paginator at line 87
bool
hasPages()
Determine if there are enough items to split into multiple pages.
in
Paginator at line 92
bool
hasMorePages()
Determine if there are more items in the data store.
in
Paginator at line 97
string|null
path()
Get the base path for paginator generated URLs.
in
Paginator at line 102
bool
isEmpty()
Determine if the list of items is empty or not.
in
Paginator at line 107
bool
isNotEmpty()
Determine if the list of items is not empty.
in
Paginator at line 114
Htmlable
render(string|null $view = null, array $data = [])
Render the paginator using a given view.
in
Paginator at line 16
$this
through(TValue): $ixed $callback)
No description
at line 21
array
getUrlRange(int $start, int $end)
Create a range of pagination URLs.
at line 26
int
total()
Determine the total number of items in the data store.
at line 31
int
lastPage()
Get the page number of the last available page.