belongsTo(Video::class); } /** Slides explicitly owned by this track. Use Video::slidesForTrack() for fallback resolution. */ public function slides() { return $this->hasMany(VideoSlide::class, 'audio_track_id')->orderBy('position'); } public function getStreamUrlAttribute(): string { return route('videos.audio-track', ['video' => $this->video_id, 'track' => $this->id]); } /** Absolute local path to the file, regardless of NAS or local storage. */ public function localPath(): string { return storage_path('app/' . $this->path); } }