hasMany(Chapter::class); } protected function totalSize(): Attribute { return Attribute::make( get: fn() => $this->chapters->sum('video_size'), ); } protected function tracks(): Attribute { return Attribute::make( get: fn(string $tracks) => empty($tracks) ? [] : explode(',', $tracks), ); } protected function totalSizeHuman(): Attribute { return Attribute::make( get: fn() => formatFileSize($this->total_size), ); } }