trait InteractsWithTime (View source)
| 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. |
Freeze time.
Freeze time at the beginning of the current second.
Begin travelling to another time.
Travel to another time.
Travel back to the current time.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Foundation/Testing/Concerns/InteractsWithTime.html