carbon sub days code example
Example 1: carbon two day ago
$dt =Carbon::now();
echo $dt->subDay(); // 2012-03-03 00:00:00
echo $dt->subDays(29);
Example 2: carbon subdays
$users = Users::where('status_id', 'active')
->where( 'created_at', '>', Carbon::now()->subDays(30))
->get();
Example 3: carbon add few hours
Carbon::now('UTC')->addHour($hours)->format('Y-m-d H:i:s')