diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index cbcf5de..f2ac204 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -103,7 +103,7 @@ public function index(Request $request) $user = Auth::user(); if ($query) { - $response = Http::post('https://ecommerce-search-engine.onrender.com/search', [ + $response = Http::timeout(6000)->post('https://ecommerce-search-engine.onrender.com/search', [ 'query' => $query, 'records' => $product->toArray(), 'confidence' => 0.3 @@ -134,7 +134,7 @@ public function show(string $id) $allProducts = Product::with('category')->get(); - $response = Http::post('https://ecommerce-search-engine.onrender.com/search', [ + $response = Http::timeout(6000)->post('https://ecommerce-search-engine.onrender.com/search', [ 'query' => $product->name, 'records' => $allProducts->toArray(), 'confidence' => 0.3,