trait InteractsWithTime

Methods

mixed
freezeTime(callable|null $callback = null)

Freeze time.

mixed
freezeSecond(callable|null $callback = null)

Freeze time at the beginning of the current second.

travel(int $value)

Begin travelling to another time.

mixed
travelTo(DateTimeInterface|Closure|string|bool|null $date, callable|null $callback = null)

Travel to another time.

CarbonInterface
travelBack()

Travel back to the current time.

Details

at line 24
mixed freezeTime(callable|null $callback = null)

Freeze time.

Parameters

callable|null $callback

Return Value

mixed

at line 39
mixed freezeSecond(callable|null $callback = null)

Freeze time at the beginning of the current second.

Parameters

callable|null $callback

Return Value

mixed

at line 49
Wormhole travel(int $value)

Begin travelling to another time.

Parameters

int $value

Return Value

Wormhole

at line 64
mixed travelTo(DateTimeInterface|Closure|string|bool|null $date, callable|null $callback = null)

Travel to another time.

Parameters

DateTimeInterface|Closure|string|bool|null $date
callable|null $callback

Return Value

mixed

at line 82
CarbonInterface travelBack()

Travel back to the current time.

Return Value

CarbonInterface