Carbon
class Carbon extends Carbon (View source)
Traits
Conditionable |
Methods
$this|TWhenReturnType | when($value = null, callable $callback = null, callable $default = null)
Apply the callback if the given "value" is (or resolves to) truthy. | from Conditionable |
$this|TUnlessReturnType | unless($value = null, callable $callback = null, callable $default = null)
Apply the callback if the given "value" is (or resolves to) falsy. | from Conditionable |
static | setTestNow($testNow = null) {@inheritdoc} |
Details
$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.
static setTestNow($testNow = null)
{@inheritdoc}
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/9.x/Illuminate/Support/Carbon.html