'date', 'expiry_date' => 'date', ]; } public function contractor(): BelongsTo { return $this->belongsTo(Contractor::class); } public function getIsExpiringSoonAttribute(): bool { if (!$this->expiry_date) return false; return $this->expiry_date->isBetween(now(), now()->addDays(30)); } public function getIsExpiredAttribute(): bool { if (!$this->expiry_date) return false; return $this->expiry_date->isPast(); } }