feat: Implement nested product category display in admin datatable with expandable rows.
This commit is contained in:
@@ -27,7 +27,7 @@ class ProductCategories extends Model
|
||||
|
||||
public function children()
|
||||
{
|
||||
return $this->hasMany(ProductCategories::class, 'parent_id');
|
||||
return $this->hasMany(ProductCategories::class, 'parent_id')->with('children');
|
||||
}
|
||||
|
||||
public function products()
|
||||
|
||||
Reference in New Issue
Block a user