interface LengthAwarePaginator implements Paginator

Methods

string
url(int $page)

Get the URL for a given page.

$this
appends(array|string $key, string|null $value = null)

Add a set of query string values to the paginator.

$this|string
fragment(string|null $fragment = null)

Get / set the URL fragment to be appended to URLs.

string|null
nextPageUrl()

The URL for the next page, or null.

string|null
previousPageUrl()

Get the URL for the previous page, or null.

array
items()

Get all of the items being paginated.

int
firstItem()

Get the "index" of the first item being paginated.

int
lastItem()

Get the "index" of the last item being paginated.

int
perPage()

Determine how many items are being shown per page.

int
currentPage()

Determine the current page being paginated.

bool
hasPages()

Determine if there are enough items to split into multiple pages.

bool
hasMorePages()

Determine if there is more items in the data store.

bool
isEmpty()

Determine if the list of items is empty or not.

string
render(string|null $view = null, array $data = [])

Render the paginator using a given view.

array
getUrlRange(int $start, int $end)

Create a range of pagination URLs.

int
total()

Determine the total number of items in the data store.

int
lastPage()

Get the page number of the last available page.

Details

in Paginator at line 13
string url(int $page)

Get the URL for a given page.

Parameters

int $page

Return Value

string

in Paginator at line 22
$this appends(array|string $key, string|null $value = null)

Add a set of query string values to the paginator.

Parameters

array|string $key
string|null $value

Return Value

$this

in Paginator at line 30
$this|string fragment(string|null $fragment = null)

Get / set the URL fragment to be appended to URLs.

Parameters

string|null $fragment

Return Value

$this|string

in Paginator at line 37
string|null nextPageUrl()

The URL for the next page, or null.

Return Value

string|null

in Paginator at line 44
string|null previousPageUrl()

Get the URL for the previous page, or null.

Return Value

string|null

in Paginator at line 51
array items()

Get all of the items being paginated.

Return Value

array

in Paginator at line 58
int firstItem()

Get the "index" of the first item being paginated.

Return Value

int

in Paginator at line 65
int lastItem()

Get the "index" of the last item being paginated.

Return Value

int

in Paginator at line 72
int perPage()

Determine how many items are being shown per page.

Return Value

int

in Paginator at line 79
int currentPage()

Determine the current page being paginated.

Return Value

int

in Paginator at line 86
bool hasPages()

Determine if there are enough items to split into multiple pages.

Return Value

bool

in Paginator at line 93
bool hasMorePages()

Determine if there is more items in the data store.

Return Value

bool

in Paginator at line 100
bool isEmpty()

Determine if the list of items is empty or not.

Return Value

bool

in Paginator at line 109
string render(string|null $view = null, array $data = [])

Render the paginator using a given view.

Parameters

string|null $view
array $data

Return Value

string

at line 14
array getUrlRange(int $start, int $end)

Create a range of pagination URLs.

Parameters

int $start
int $end

Return Value

array

at line 21
int total()

Determine the total number of items in the data store.

Return Value

int

at line 28
int lastPage()

Get the page number of the last available page.

Return Value

int