'date', 'achieved_date' => 'date', 'is_critical' => 'boolean', ]; } public function project(): BelongsTo { return $this->belongsTo(Project::class); } public function getIsAchievedAttribute(): bool { return $this->achieved_date !== null; } public function getIsOverdueAttribute(): bool { return !$this->is_achieved && $this->target_date->isPast(); } }