On this page
Cursor
class Cursor implements Arrayable (View source)
Properties
protected array | $parameters | The parameters associated with the cursor. |
|
protected bool | $pointsToNextItems | Determine whether the cursor points to the next or previous set of items. |
Methods
__construct(array $parameters, bool $pointsToNextItems = true) Create a new cursor instance. |
||
string|null | parameter(string $parameterName) Get the given parameter from the cursor. |
|
array | parameters(array $parameterNames) Get the given parameters from the cursor. |
|
bool | pointsToNextItems() Determine whether the cursor points to the next set of items. |
|
bool | pointsToPreviousItems() Determine whether the cursor points to the previous set of items. |
|
toArray() Get the array representation of the cursor. |
||
string | encode() Get the encoded string representation of the cursor to construct a URL. |
|
static Cursor|null | fromEncoded(string|null $encodedString) Get a cursor instance from the encoded string representation. |
Details
__construct(array $parameters, bool $pointsToNextItems = true)
Create a new cursor instance.
string|null parameter(string $parameterName)
Get the given parameter from the cursor.
array parameters(array $parameterNames)
Get the given parameters from the cursor.
bool pointsToNextItems()
Determine whether the cursor points to the next set of items.
bool pointsToPreviousItems()
Determine whether the cursor points to the previous set of items.
toArray()
Get the array representation of the cursor.
string encode()
Get the encoded string representation of the cursor to construct a URL.
static Cursor|null fromEncoded(string|null $encodedString)
Get a cursor instance from the encoded string representation.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Pagination/Cursor.html