carbon methods code example
Example 1: carbon laravel use
<?php
use Carbon\Carbon;
Example 2: carbon two day ago
$dt =Carbon::now();
echo $dt->subDay(); // 2012-03-03 00:00:00
echo $dt->subDays(29);
<?php
use Carbon\Carbon;
$dt =Carbon::now();
echo $dt->subDay(); // 2012-03-03 00:00:00
echo $dt->subDays(29);