'integer', 'sort' => 'integer', ]; public function category(): BelongsTo { return $this->belongsTo(Category::class, 'category_id'); } public function scopePublished($query) { return $query->where('status', 'published')->orderBy('sort')->orderBy('name'); } public function seoTitle(): string { return $this->seo_title ?: ($this->name . ' - 深圳市云创芯电子有限公司'); } public function seoDescription(): string { return $this->seo_description ?: ($this->summary ?: $this->name); } }