carbon compare same date

PHP
$date1->toDateString() == $date2->toDateString()
Source

Also in PHP: