AbstractPaginator
class AbstractPaginator implements Htmlable (View source)
Methods
Create a range of pagination URLs.
Get a URL for a given page number.
Get the URL for the previous page.
Get / set the URL fragment to be appended to URLs.
Add a set of query string values to the paginator.
Add a query string value to the paginator.
Get the slice of items being paginated.
Get the number of the first item in the slice.
Get the number of the last item in the slice.
Get the number of items shown per page.
Get the current page.
Determine if there are enough items to split into multiple pages.
Resolve the current request path or return the default value.
Resolve the current page or return the default value.
Get the query string variable used to store the page.
Set the query string variable used to store the page.
Set the base path to assign to all URLs.
Get an iterator for the items.
Determine if the list of items is empty or not.
Get the number of items for the current page.
Get the paginator's underlying collection.
Determine if the given item exists.
Get the item at the given offset.
Set the item at the given offset.
Unset the item at the given key.
Render the contents of the paginator to HTML.
Make dynamic calls into the collection.
Render the contents of the paginator when casting to string.
Details
at line line 157
$this|string|null
fragment(
string|null $fragment = null)
Get / set the URL fragment to be appended to URLs.
at line line 175
$this
appends(
array|string $key,
string|null $value = null)
Add a set of query string values to the paginator.
at line line 206
$this
addQuery(
string $key,
string $value)
Add a query string value to the paginator.
at line line 299
static
string
resolveCurrentPath(
string $default = '/')
Resolve the current request path or return the default value.
at line line 314
static
void
currentPathResolver(
Closure $resolver)
Set the current request path resolver callback.
at line line 326
static
int
resolveCurrentPage(
string $pageName = 'page',
int $default = 1)
Resolve the current page or return the default value.
at line line 341
static
void
currentPageResolver(
Closure $resolver)
Set the current page resolver callback.
at line line 373
$this
setPageName(
string $name)
Set the query string variable used to store the page.
at line line 439
$this
setCollection(
Collection $collection)
Set the paginator's underlying collection.
at line line 508
mixed
__call(
string $method,
array $parameters)
Make dynamic calls into the collection.