interface Paginator

Methods

string
url(int $page)

Get the URL for a given page.

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

Add a set of query string values to the paginator.

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

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

withQueryString()

Add all current query string values to the paginator.

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|null
firstItem()

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

int|null
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 are more items in the data store.

string|null
path()

Get the base path for paginator generated URLs.

bool
isEmpty()

Determine if the list of items is empty or not.

bool
isNotEmpty()

Determine if the list of items is not empty.

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

Render the paginator using a given view.

$this
through(TValue): $ixed $callback)

No description

Details

at line 21
string url(int $page)

Get the URL for a given page.

Parameters

int $page

Return Value

string

at line 28
Paginator appends(array|string|null $key, string|null $value = null)

Add a set of query string values to the paginator.

Parameters

array|string|null $key
string|null $value

Return Value

Paginator

at line 35
Paginator|string|null fragment(string|null $fragment = null)

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

Parameters

string|null $fragment

Return Value

Paginator|string|null

at line 42
Paginator withQueryString()

Add all current query string values to the paginator.

Return Value

Paginator

at line 47
string|null nextPageUrl()

The URL for the next page, or null.

Return Value

string|null

at line 52
string|null previousPageUrl()

Get the URL for the previous page, or null.

Return Value

string|null

at line 59
array items()

Get all of the items being paginated.

Return Value

array

at line 64
int|null firstItem()

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

Return Value

int|null

at line 69
int|null lastItem()

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

Return Value

int|null

at line 74
int perPage()

Determine how many items are being shown per page.

Return Value

int

at line 79
int currentPage()

Determine the current page being paginated.

Return Value

int

at line 84
bool hasPages()

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

Return Value

bool

at line 89
bool hasMorePages()

Determine if there are more items in the data store.

Return Value

bool

at line 94
string|null path()

Get the base path for paginator generated URLs.

Return Value

string|null

at line 99
bool isEmpty()

Determine if the list of items is empty or not.

Return Value

bool

at line 104
bool isNotEmpty()

Determine if the list of items is not empty.

Return Value

bool

at line 111
Htmlable render(string|null $view = null, array $data = [])

Render the paginator using a given view.

Parameters

string|null $view
array $data

Return Value

Htmlable

at line 16
$this through(TValue): $ixed $callback)

No description

Parameters

TValue): $ixed $callback

Return Value

$this