'date:Y-m-d', 'actual_repair_date' => 'date:Y-m-d', ]; public function communications() { return $this->hasMany(Communication::class); } public function getFullDateTimeAttribute() { return $this->requested_date->format('Y-m-d') . ' ' . $this->requested_time->format('H:i'); } public function getActualDateTimeAttribute() { if ($this->actual_repair_date && $this->actual_repair_time) { return $this->actual_repair_date->format('Y-m-d') . ' ' . $this->actual_repair_time->format('H:i'); } return null; } }