mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
fix duration_text attribute
This commit is contained in:
@@ -68,10 +68,10 @@ class Exam extends NexusModel
|
||||
return self::$discovers[$this->is_discovered]['text'] ?? '';
|
||||
}
|
||||
|
||||
public function getDurationTextAttribute($value): string
|
||||
public function getDurationTextAttribute(): string
|
||||
{
|
||||
if ($value > 0) {
|
||||
return $value . ' Days';
|
||||
if ($this->duration > 0) {
|
||||
return $this->duration . ' Days';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user