CarbonImmutable
class CarbonImmutable extends CarbonImmutable implements Transient
Carbon's immutable magic modifier metadata names its base class even though these methods preserve subclasses at runtime.
Traits
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a date instance from a given time-based UUID or ULID.
Get the date / time plus a given amount of time.
Get the date / time minus a given amount of time.
Convert the instance to an immutable date.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
Conditionable at line 23
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
in
Conditionable at line 56
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
in
Dumpable at line 12
never
dd(mixed ...$args)
Dump the given arguments and terminate execution.
in
DateHelpers at line 20
static DateHelpers
createFromId(Uuid|Ulid|string $id)
Create a date instance from a given time-based UUID or ULID.
in
DateHelpers at line 38
DateHelpers
plus(int $years = 0, int $months = 0, int $weeks = 0, int $days = 0, int $hours = 0, int $minutes = 0, int $seconds = 0, int $microseconds = 0, bool|null $overflow = null)
Get the date / time plus a given amount of time.
in
DateHelpers at line 69
DateHelpers
minus(int $years = 0, int $months = 0, int $weeks = 0, int $days = 0, int $hours = 0, int $minutes = 0, int $seconds = 0, int $microseconds = 0, bool|null $overflow = null)
Get the date / time minus a given amount of time.
at line 35
Carbon
toMutable()
Convert the instance to a mutable date.
at line 43
CarbonImmutable
toImmutable()
Convert the instance to an immutable date.
at line 28
static void
addMicrosecond()
No description
at line 28
static void
addMicroseconds(int|float $value = '1')
No description
at line 28
static void
addMinute()
No description
at line 28
static void
addMinutes(int|float $value = '1')
No description
at line 28
static void
addSecond()
No description
at line 28
static void
addSeconds(int|float $value = '1')
No description
at line 28
static void
ceilSecond(float $precision = '1')
No description
at line 28
static void
ceilSeconds(float $precision = '1')
No description
at line 28
static void
subDay()
No description
at line 28
static void
subMicrosecond()
No description
at line 28
static void
subMinutes(int|float $value = '1')
No description
at line 28
static void
subSeconds(int|float $value = '1')
No description