carbon compare if dates are the same code example Example: carbon compare same date $date1->toDateString() == $date2->toDateString()