From af4d1a3d1f2cacb9f3d18039c7e63213e90b631f Mon Sep 17 00:00:00 2001 From: Hafifie PKB Date: Tue, 21 Nov 2023 14:18:22 +0800 Subject: [PATCH] added log in transaction ansuran --- app/Http/Controllers/GadaiController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/GadaiController.php b/app/Http/Controllers/GadaiController.php index f16f5e8..e443a22 100644 --- a/app/Http/Controllers/GadaiController.php +++ b/app/Http/Controllers/GadaiController.php @@ -33,6 +33,7 @@ use App\InOutMar; use Illuminate\Http\Request; use App\Services\OnePercentServices; +use Log; use Illuminate\Support\Facades\DB; @@ -564,12 +565,14 @@ class GadaiController extends Controller } DB::commit(); - return response()->json("success", 200); }); }catch(\Exception $e){ + Log::error("Transaction failed: " . $e->getMessage()); return response()->json("Transaction failed: " . $e->getMessage(),500); } + + return response()->json("success",200); } public function getGadaianSemasa($kodcaw){