LengthAwarePaginator
extends
Paginator
in
Table of Contents
- appends() : $this
- Add a set of query string values to the paginator.
- currentPage() : int
- Determine the current page being paginated.
- firstItem() : int
- Get the "index" of the first item being paginated.
- fragment() : $this|string
- Get / set the URL fragment to be appended to URLs.
- getUrlRange() : array<string|int, mixed>
- Create a range of pagination URLs.
- hasMorePages() : bool
- Determine if there is more items in the data store.
- hasPages() : bool
- Determine if there are enough items to split into multiple pages.
- isEmpty() : bool
- Determine if the list of items is empty or not.
- isNotEmpty() : bool
- Determine if the list of items is not empty.
- items() : array<string|int, mixed>
- Get all of the items being paginated.
- lastItem() : int
- Get the "index" of the last item being paginated.
- lastPage() : int
- Get the page number of the last available page.
- nextPageUrl() : string|null
- The URL for the next page, or null.
- perPage() : int
- Determine how many items are being shown per page.
- previousPageUrl() : string|null
- Get the URL for the previous page, or null.
- render() : string
- Render the paginator using a given view.
- total() : int
- Determine the total number of items in the data store.
- url() : string
- Get the URL for a given page.
Methods
appends()
Add a set of query string values to the paginator.
public
appends(array<string|int, mixed>|string $key[, string|null $value = null ]) : $this
Parameters
- $key : array<string|int, mixed>|string
- $value : string|null = null
Return values
$this —currentPage()
Determine the current page being paginated.
public
currentPage() : int
Return values
int —firstItem()
Get the "index" of the first item being paginated.
public
firstItem() : int
Return values
int —fragment()
Get / set the URL fragment to be appended to URLs.
public
fragment([string|null $fragment = null ]) : $this|string
Parameters
- $fragment : string|null = null
Return values
$this|string —getUrlRange()
Create a range of pagination URLs.
public
getUrlRange(int $start, int $end) : array<string|int, mixed>
Parameters
- $start : int
- $end : int
Return values
array<string|int, mixed> —hasMorePages()
Determine if there is more items in the data store.
public
hasMorePages() : bool
Return values
bool —hasPages()
Determine if there are enough items to split into multiple pages.
public
hasPages() : bool
Return values
bool —isEmpty()
Determine if the list of items is empty or not.
public
isEmpty() : bool
Return values
bool —isNotEmpty()
Determine if the list of items is not empty.
public
isNotEmpty() : bool
Return values
bool —items()
Get all of the items being paginated.
public
items() : array<string|int, mixed>
Return values
array<string|int, mixed> —lastItem()
Get the "index" of the last item being paginated.
public
lastItem() : int
Return values
int —lastPage()
Get the page number of the last available page.
public
lastPage() : int
Return values
int —nextPageUrl()
The URL for the next page, or null.
public
nextPageUrl() : string|null
Return values
string|null —perPage()
Determine how many items are being shown per page.
public
perPage() : int
Return values
int —previousPageUrl()
Get the URL for the previous page, or null.
public
previousPageUrl() : string|null
Return values
string|null —render()
Render the paginator using a given view.
public
render([string|null $view = null ][, array<string|int, mixed> $data = [] ]) : string
Parameters
- $view : string|null = null
- $data : array<string|int, mixed> = []
Return values
string —total()
Determine the total number of items in the data store.
public
total() : int
Return values
int —url()
Get the URL for a given page.
public
url(int $page) : string
Parameters
- $page : int