interface Illuminate / Contracts / Pagination / Paginator
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Paginator

Methods

public

url ( $page ) : string

Get the URL for a given page.

Parameters

  • $page int
public

appends ( $key , $value ) : $this

Add a set of query string values to the paginator.

Parameters

  • $key array|string|null
  • $value string|null
public

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

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

Parameters

  • $fragment string|null
public

nextPageUrl ( ) : string|null

The URL for the next page, or null.

public

previousPageUrl ( ) : string|null

Get the URL for the previous page, or null.

public

items ( ) : array

Get all of the items being paginated.

public

firstItem ( ) : int|null

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

public

lastItem ( ) : int|null

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

public

perPage ( ) : int

Determine how many items are being shown per page.

public

currentPage ( ) : int

Determine the current page being paginated.

public

hasPages ( ) : bool

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

public

hasMorePages ( ) : bool

Determine if there are more items in the data store.

public

path ( ) : string|null

Get the base path for paginator generated URLs.

public

isEmpty ( ) : bool

Determine if the list of items is empty or not.

public

isNotEmpty ( ) : bool

Determine if the list of items is not empty.

public

render ( $view , $data ) : string

Render the paginator using a given view.

Parameters

  • $view string|null
  • $data array