class Illuminate / Pagination / CursorPaginator
You are viewing an older version of the documentation. For the latest, please visit master documentation.

CursorPaginator

Extends

Implements

Properties

protected

$hasMore

Indicates whether there are more items in the data source.

Default: null

Methods

public

__construct ( $items , $perPage , $cursor , array $options ) : void

Create a new paginator instance.

Parameters

  • $items mixed
  • $perPage int
  • $cursor Cursor |null
  • $options array
    (path, query, fragment, pageName)
protected

setItems ( $items ) : void

Set the items for the paginator.

Parameters

  • $items mixed
public

Render the paginator using the given view.

Parameters

  • $view string|null
  • $data array
public

render ( $view , $data ) : Htmlable

Render the paginator using the given view.

Parameters

  • $view string|null
  • $data array
public

hasMorePages ( ) : bool

Determine if there are more items in the data source.

public

hasPages ( ) : bool

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

public

onFirstPage ( ) : bool

Determine if the paginator is on the first page.

public

toArray ( ) : array

Get the instance as an array.

public

jsonSerialize ( ) : array

Convert the object into something JSON serializable.

public

toJson ( $options ) : string

Convert the object to its JSON representation.

Parameters

  • $options int