php carbon compare dates within 10 min code example
Example 1: carbon now format
use Carbon/Carbon
Carbon::now()->format('Y-m-d H:i:s');
Example 2: carbon compare same date
$date1->toDateString() == $date2->toDateString()
use Carbon/Carbon
Carbon::now()->format('Y-m-d H:i:s');
$date1->toDateString() == $date2->toDateString()