To
class To extends Mutator (View source)
Convert the input to a given type,
Supports the following types:
int
float
bool
string
array
object
Traits
Methods
__construct(string $type)
No description
mixed
mutate(mixed $value)
Mutate the input value.
Details
__construct(string $type)
No description
static To
array()
Convert the input to an array.
static To
bool()
Convert the input to a boolean.
static To
float()
Convert the input to a float.
static To
int()
Convert the input to an integer.
static To
make(string $type)
No description
mixed
mutate(mixed $value)
Mutate the input value.
static To
object()
Convert the input to an object.
protected string
resolveStringInput(mixed $value)
No description
static To
string()
Convert the input to a string.