diff --git a/packages/Sarga/API/Http/Controllers/Categories.php b/packages/Sarga/API/Http/Controllers/Categories.php index fa60a7ee0..015524da8 100644 --- a/packages/Sarga/API/Http/Controllers/Categories.php +++ b/packages/Sarga/API/Http/Controllers/Categories.php @@ -32,7 +32,7 @@ class Categories extends CategoryController } public function filters($id){ - $category = $this->categoryRepository->with(['filterableAttributes','brands' => function ($q){ + $category = $this->getRepositoryInstance()->with(['filterableAttributes','brands' => function ($q){ $q->take(20); } ]) ->find($id);