class
Illuminate
/
Pagination
/
CursorPaginator
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
CursorPaginator
Extends
Implements
- Illuminate\...\Arrayable
- ArrayAccess
- Countable
- IteratorAggregate
- Jsonable
- JsonSerializable
- CursorPaginator
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
links ( $view , $data ) : Htmlable
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
onLastPage ( ) : bool
Determine if the paginator is on the last 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