belongsTo(Category::class); } public function media(): HasMany { return $this->hasMany(Media::class, 'subcategory_id'); } }