Travel is a framework agnostic wrapper around Carbon, it helps you travel to a certain date and travel back to today's date in a readable way.
You can install the package via composer:
composer require rachidlaasri/travel
Travel to a certain date with:
// Jump to 2009 and watch the last Michael Jackson live performance.
Travel::to('01-01-2009');
Travel to a given date, excute a piece of code and reset:
// Travel to the past and un-say that embarassing thing you said and come back.
Travel::to('-5 minutes', function() {
// Do something.
});
Reset the date to today's date
Travel::back();
composer test
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.