'date', 'spotify_synced_at' => 'datetime', 'youtube_synced_at' => 'datetime', 'gallery' => 'array', 'is_active' => 'boolean', 'sort_order' => 'integer', ]; public function getUrlAttribute() { return route('music-productions.show', $this->slug); } public function getCoverImageUrlAttribute() { if ($this->cover_image) { return asset('storage/' . $this->cover_image); } if ($this->spotify_cover_url) { return $this->spotify_cover_url; } if ($this->youtube_cover_url) { return $this->youtube_cover_url; } return null; } public function getDisplayCoverImageAttribute(): ?string { if ($this->cover_image) { return $this->cover_image; } return null; } public function scopeActive($query) { return $query->where('is_active', true); } public function scopeOrdered($query) { return $query->orderBy('sort_order', 'asc')->orderBy('production_date', 'desc'); } }