attributes['start_time'] = is_int($value) ? $value : strtotime($value); } public function getStartTimeAttribute() { return date('Y-m-d H:i:s', $this->attributes['start_time']); } public function setEndTimeAttribute($value) { $this->attributes['end_time'] = is_int($value) ? $value : strtotime($value); } public function getEndTimeAttribute() { return date('Y-m-d H:i:s', $this->attributes['end_time']); } }