fix duration_text attribute

This commit is contained in:
xiaomlove
2021-05-08 16:31:19 +08:00
parent d23a85a888
commit bd1ab5fc9a
+3 -3
View File
@@ -68,10 +68,10 @@ class Exam extends NexusModel
return self::$discovers[$this->is_discovered]['text'] ?? ''; return self::$discovers[$this->is_discovered]['text'] ?? '';
} }
public function getDurationTextAttribute($value): string public function getDurationTextAttribute(): string
{ {
if ($value > 0) { if ($this->duration > 0) {
return $value . ' Days'; return $this->duration . ' Days';
} }
return ''; return '';
} }