From 482d04949dcb04068dbf4defac427e917e372b1d Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 6 Sep 2022 14:12:52 +0700 Subject: [PATCH] integration improvement --- app/Http/Controllers/RequestMaterialController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/RequestMaterialController.php b/app/Http/Controllers/RequestMaterialController.php index 693cbae..605cf5f 100644 --- a/app/Http/Controllers/RequestMaterialController.php +++ b/app/Http/Controllers/RequestMaterialController.php @@ -190,7 +190,10 @@ class RequestMaterialController extends Controller foreach($response->data as $d){ array_push($data, $d); } - } while ($currentPage < $firstResponse->last_page); + } while ($currentPage < 5); + // let the user narrow down the search by themself + // a searching action with 'cable' keyword could take minutes + // because there are >1k items associated with that keyword } return response()->json(['status'=>'success', 'data'=> $data, 'total' => count($data), 'code'=>200], 200);