diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php index 72dbf5a4e..abb0551f6 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/CategoriesController.php @@ -22,10 +22,11 @@ class CategoriesController extends Controller public function index(){ - $data = $this->Categories->select('id','name') + $data = $this->Category->select('id','name') ->with(['translations:model_id,locale,attribute_data']) ->where('status',1) - ->get()->toArray(); + ->get() + ->toArray(); return $this->helpers->apiArrayResponseBuilder(200, 'success', $data); }