'datetime', ]; public const CATEGORIES = [ 'industry' => '行业资讯', 'company' => '公司动态', 'event' => '展会活动', ]; public function scopePublished($query) { return $query->where('status', 'published') ->whereNotNull('published_at') ->orderByDesc('published_at'); } public function categoryLabel(): string { return self::CATEGORIES[$this->category] ?? $this->category ?? '—'; } public function seoTitle(): string { return $this->seo_title ?: $this->title; } public function seoDescription(): string { return $this->seo_description ?: ($this->summary ?: $this->title); } }