hasMany(Chapter::class); } public function totalSize(): Attribute { return Attribute::make( get: fn() => $this->chapters->sum('video_size'), ); } public function totalSizeHuman(): Attribute { return Attribute::make( get: fn() => formatFileSize($this->total_size), ); } }