feat: Many category and Many sub-category media

This commit is contained in:
2026-05-31 20:18:53 +03:30
parent 56f0e8dbe2
commit 449a542571
6 changed files with 190 additions and 48 deletions
+5
View File
@@ -17,5 +17,10 @@ public function subcategories()
{
return $this->hasMany(SubCategory::class);
}
public function media()
{
return $this->belongsToMany(Media::class, 'category_media');
}
}