From 89f56a30911407e1ac087f449394a6618aa8224a Mon Sep 17 00:00:00 2001 From: merdan Date: Tue, 11 May 2021 14:32:49 +0500 Subject: [PATCH] api --- .../apigenerator/controllers/api/CategoriesController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }