Fake Carbon::now() for Testing
If you want Carbon::now() to return a specific date and time, you can fake it by using:
$myDate = Carbon::create(2018, 07, 14, 3, 15);
Carbon::setTestNow($myDate);
echo Carbon::now();
If you want Carbon::now() to return a specific date and time, you can fake it by using:
$myDate = Carbon::create(2018, 07, 14, 3, 15);
Carbon::setTestNow($myDate);
echo Carbon::now();