carbon 2 php compare dates code example Example: carbon compare same date $date1->toDateString() == $date2->toDateString()