tx = Carbon::createFromTimestamp(strtotime($record->starttime)); if ($record->event_bookmaker?->starttime) { $this->cl = Carbon::createFromTimestamp(strtotime($record->event_bookmaker?->starttime)); $this->starttime = Carbon::createFromTimestamp(strtotime($record->event_bookmaker?->starttime)); if ($this->tx == $this->cl) { $this->color = 'text-green-600'; } else { $this->color = 'text-orange-600'; } } else { $this->color = 'text-blue-600'; $this->starttime = Carbon::createFromTimestamp(strtotime($record->starttime)); } } public function getColor() { return $this->color; } public function getStarttime() { return $this->starttime; } }