diff --git a/packages/Sarga/API/Http/Controllers/Categories.php b/packages/Sarga/API/Http/Controllers/Categories.php index 441ad8fd8..819d76793 100644 --- a/packages/Sarga/API/Http/Controllers/Categories.php +++ b/packages/Sarga/API/Http/Controllers/Categories.php @@ -37,8 +37,8 @@ class Categories extends Controller if($category) return response([ - 'subcategories' =>$category->children, - 'attributes' =>Attribute::collection($category->filterableAttributes), + 'subcategories' => Category::collection($category->children), + 'attributes' => Attribute::collection($category->filterableAttributes), 'brands' => Brand::collection($category->brands), ]); else{