'datetime', ]; } /** * @return MorphTo */ public function shareable(): MorphTo { return $this->morphTo(); } public function isExpired(): bool { return $this->expires_at !== null && $this->expires_at->isPast(); } public function hasReachedLimit(): bool { return $this->max_downloads !== null && $this->downloads_count >= $this->max_downloads; } public function isActive(): bool { return ! $this->isExpired() && ! $this->hasReachedLimit(); } }