Try this:
$knownDate = Carbon::create(2001, 5, 21, 12); // create testing date
Carbon::setTestNow($knownDate); // set the mock (of course this could be a real mock object)
echo Carbon::now();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community