From fbc2510ef3bbe9674ec41504fd219a23584d4b9d Mon Sep 17 00:00:00 2001 From: Afiq Hamzah Date: Sun, 26 Jan 2025 16:37:25 +0800 Subject: [PATCH] Fix billplzTransactionReview page by conversion of collection to array --- app/Http/Controllers/BillplzTransactionReviewController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/BillplzTransactionReviewController.php b/app/Http/Controllers/BillplzTransactionReviewController.php index a0e866f..3aafd26 100644 --- a/app/Http/Controllers/BillplzTransactionReviewController.php +++ b/app/Http/Controllers/BillplzTransactionReviewController.php @@ -20,7 +20,7 @@ class BillplzTransactionReviewController extends Controller $billplzTransactionReview = array_map(function($company_code) use($date){ $billplzService = new BillplzService($company_code); - return $billplzService->getBillplzTransactionReview($date); + return $billplzService->getBillplzTransactionReview($date)->toArray(); }, $companyMapping); return response()->json(array_merge(...$billplzTransactionReview), 200); @@ -35,7 +35,7 @@ class BillplzTransactionReviewController extends Controller $billplzTransactionReview = array_map(function($company_code) use($request){ $billplzService = new BillplzService($company_code); - return $billplzService->getBillplzTransactionReviewByBillId($request->bill_id); + return $billplzService->getBillplzTransactionReviewByBillId($request->bill_id)->toArray(); }, $companyMapping); return response()->json($billplzTransactionReview, 200);