diff --git a/app/Http/Controllers/Bo/ProductsController.php b/app/Http/Controllers/Bo/ProductsController.php index 2b819278..774de07d 100644 --- a/app/Http/Controllers/Bo/ProductsController.php +++ b/app/Http/Controllers/Bo/ProductsController.php @@ -51,7 +51,6 @@ class ProductsController extends Controller } $searchFields = trans('Nom, Desc., Ingr., Cons., Tags, Infos'); $p = $p->paginate(); - // dd($p); return view('bo.products.index', compact('p', 'searchFields', 'ranges')); } diff --git a/app/Lib/MesBR.php b/app/Lib/MesBR.php index 73c309db..c5617076 100644 --- a/app/Lib/MesBR.php +++ b/app/Lib/MesBR.php @@ -32,7 +32,9 @@ class MesBR } public function printCoupons(string $hashcode, array $coupons) { - return $this->callApi("GET", '/coupons/print', ['refcamp' => $this->refCamp, 'hashcode' => $hashcode, 'coupons' => implode(",", $coupons)]); + return $this->callApi("GET", '/coupons/print', [ + 'refcamp' => $this->refCamp, 'hashcode' => $hashcode, 'coupons' => implode(",", $coupons) + ]); } private function callApi($method, $url, $data = []) { @@ -65,10 +67,14 @@ class MesBR if (!curl_errno($curl)) { $http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE); if (!in_array($http_code, [200, 201])) { - return (object)['status' => 'KO', 'code' => 500, 'message' => 'Connection to API failed - Code HTTP : ' . $http_code]; + return (object)[ + 'status' => 'KO', 'code' => 500, 'message' => 'Connection to API failed - Code HTTP : ' . $http_code + ]; } } else { - return (object)['status' => 'KO', 'code' => 500, 'message' => 'Connection to API failed : ' . curl_error($curl)]; + return (object)[ + 'status' => 'KO', 'code' => 500, 'message' => 'Connection to API failed : ' . curl_error($curl) + ]; } curl_close($curl); return json_decode($result);