Level 88
You can just use carbon to do that
$timestamp = \Carbon\Carbon::now()->subDay(1)->timestamp;
You can find more methods in the documentation: https://carbon.nesbot.com/docs/
Hi! I am writing a test to give the user ability sort courses from oldest to newest and I need to offset the time stamp so I can simulate a course that was create few hours ago and a course that is recently created. Thanks for your help
You can just use carbon to do that
$timestamp = \Carbon\Carbon::now()->subDay(1)->timestamp;
You can find more methods in the documentation: https://carbon.nesbot.com/docs/
Please or to participate in this conversation.