diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/categoriesController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/categoriesController.php index 4f238b9..b81887a 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/categoriesController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/categoriesController.php @@ -30,8 +30,8 @@ class categoriesController extends Controller } public function show($id){ - // $input = \Input::all(); - // $pgn=$input['pgn']; + $input = \Input::all(); + $pgn=$input['pgn']; // $data = $this->Post::with(['translations:locale,model_id,attribute_data','categories'])->get(); $dataaaa = $this->Category::with(['translations:locale,model_id,attribute_data','posts.featured_images' , 'posts.translations'])->find($id); // $data = Post::where('categories:id', $dataaaa['id'])->get(); @@ -39,7 +39,7 @@ class categoriesController extends Controller { $q->where('id' , $dataaaa['id']); - })->with(['translations:locale,model_id,attribute_data','featured_images'])->paginate(2); + })->with(['translations:locale,model_id,attribute_data','featured_images'])->paginate($pgn); if ($data){ return $this->helpers->apiArrayResponseBuilder(200, 'success', [$data]);