ValidatedInput
class ValidatedInput implements ValidatedData (View source)
Properties
protected array | $input | The underlying input. |
Methods
void | __construct(array $input)
Create a new validated input container. | |
bool | has(mixed $keys)
Determine if the validated input has one or more keys. | |
bool | missing(mixed $keys)
Determine if the validated input is missing one or more keys. | |
array | only(mixed $keys)
Get a subset containing the provided keys with values from the input data. | |
array | except(mixed $keys)
Get all of the input except for a specified array of items. | |
ValidatedInput | merge(array $items)
Merge the validated input with the given array of additional data. | |
Collection | collect()
Get the input as a collection. | |
array | all()
Get the raw, underlying input array. | |
toArray()
Get the instance as an array. | ||
mixed | __get(string $name)
Dynamically access input data. | |
mixed | __set(string $name, mixed $value)
Dynamically set input data. | |
bool | __isset($name)
Determine if an input key is set. | |
void | __unset(string $name)
Remove an input key. | |
bool | offsetExists(mixed $key)
Determine if an item exists at an offset. | |
mixed | offsetGet(mixed $key)
Get an item at a given offset. | |
void | offsetSet(mixed $key, mixed $value)
Set the item at a given offset. | |
void | offsetUnset(string $key)
Unset the item at a given offset. | |
Traversable | getIterator()
Get an iterator for the input. |
Details
void __construct(array $input)
Create a new validated input container.
bool has(mixed $keys)
Determine if the validated input has one or more keys.
bool missing(mixed $keys)
Determine if the validated input is missing one or more keys.
array only(mixed $keys)
Get a subset containing the provided keys with values from the input data.
array except(mixed $keys)
Get all of the input except for a specified array of items.
ValidatedInput merge(array $items)
Merge the validated input with the given array of additional data.
Collection collect()
Get the input as a collection.
array all()
Get the raw, underlying input array.
toArray()
Get the instance as an array.
mixed __get(string $name)
Dynamically access input data.
mixed __set(string $name, mixed $value)
Dynamically set input data.
bool __isset($name)
Determine if an input key is set.
void __unset(string $name)
Remove an input key.
bool offsetExists(mixed $key)
Determine if an item exists at an offset.
mixed offsetGet(mixed $key)
Get an item at a given offset.
void offsetSet(mixed $key, mixed $value)
Set the item at a given offset.
void offsetUnset(string $key)
Unset the item at a given offset.
Traversable getIterator()
Get an iterator for the input.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/9.x/Illuminate/Support/ValidatedInput.html