InteractsWithTime
trait InteractsWithTime (View source)
Methods
mixed
freezeTime(callable|null $callback = null)
Freeze time.
mixed
freezeSecond(callable|null $callback = null)
Freeze time at the beginning of the current second.
mixed
travelTo(DateTimeInterface|Closure|Carbon|string|bool|null $date, callable|null $callback = null)
Travel to another time.
travelBack()
Travel back to the current time.
Details
mixed
freezeTime(callable|null $callback = null)
Freeze time.
mixed
freezeSecond(callable|null $callback = null)
Freeze time at the beginning of the current second.
Wormhole
travel(int $value)
Begin travelling to another time.
mixed
travelTo(DateTimeInterface|Closure|Carbon|string|bool|null $date, callable|null $callback = null)
Travel to another time.
DateTimeInterface
travelBack()
Travel back to the current time.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.