public function getConditionName() { if ($this->condition) { if ($this->condition->is_other) { return $this->other_condition; } else { return $this->condition->name; } } else { return 'N/A'; } }