class Carbon extends Carbon (View source)

Traits

Methods

$this|TWhenReturnType
when($value = null, callable $callback = null, callable $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

$this|TUnlessReturnType
unless($value = null, callable $callback = null, callable $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

never
dd(mixed ...$args)

Dump the given arguments and terminate execution.

from  Dumpable
$this
dump(mixed ...$args)

Dump the given arguments.

from  Dumpable
static 
setTestNow($testNow = null)

{@inheritdoc}

static Carbon
createFromId(Uuid|Ulid|string $id)

Create a Carbon instance from a given ordered UUID or ULID.

Details

$this|TWhenReturnType when($value = null, callable $callback = null, callable $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

Parameters

$value
callable $callback
callable $default

Return Value

$this|TWhenReturnType

$this|TUnlessReturnType unless($value = null, callable $callback = null, callable $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

Parameters

$value
callable $callback
callable $default

Return Value

$this|TUnlessReturnType

never dd(mixed ...$args)

Dump the given arguments and terminate execution.

Parameters

mixed ...$args

Return Value

never

$this dump(mixed ...$args)

Dump the given arguments.

Parameters

mixed ...$args

Return Value

$this

static setTestNow($testNow = null)

{@inheritdoc}

Parameters

$testNow

static Carbon createFromId(Uuid|Ulid|string $id)

Create a Carbon instance from a given ordered UUID or ULID.

Parameters

Uuid|Ulid|string $id

Return Value

Carbon