W3cubDocs

/Laravel 8

InteractsWithTime

trait InteractsWithTime (View source)

Methods

Wormhole travel(int $value)

Begin travelling to another time.

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

Travel to another time.

DateTimeInterface travelBack()

Travel back to the current time.

Details

Wormhole travel(int $value)

Begin travelling to another time.

Parameters

int $value

Return Value

Wormhole

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

Travel to another time.

Parameters

DateTimeInterface $date
callable|null $callback

Return Value

mixed

DateTimeInterface travelBack()

Travel back to the current time.

Return Value

DateTimeInterface

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Foundation/Testing/Concerns/InteractsWithTime.html