class
Illuminate
/
Pagination
/
Paginator
You are viewing an older version of the documentation. For the latest, please visit master documentation.
Paginator
Extends
Implements
Properties
protected
$hasMore
Determine if there are more items in the data source.
Default: null
Methods
public
__construct ( $items , $perPage , $currentPage , array $options ) : void
Create a new paginator instance.
Parameters
- $items mixed
- $perPage int
- $currentPage int|null
-
$options
array
(path, query, fragment, pageName)
protected
setCurrentPage ( $currentPage ) : int
Get the current page for the request.
Parameters
- $currentPage int
protected
setItems ( $items ) : void
Set the items for the paginator.
Parameters
- $items mixed
public
nextPageUrl ( ) : string|null
Get the URL for the next page.
public
links ( $view , $data ) : string
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
hasMorePagesWhen ( $hasMore ) : $this
Manually indicate that the paginator does have more pages.
Parameters
- $hasMore bool
public
hasMorePages ( ) : bool
Determine if there are more items in the data source.
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