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: function () { return formatFileSize($this->total_size); }, ); } }