From ad4fa1bcba181d7e9fc33e87b4f076ff6645453e Mon Sep 17 00:00:00 2001 From: gholak tala Date: Mon, 4 May 2026 16:47:28 +0000 Subject: [PATCH] NASER customer name and mobile is not requiered for gift card and fix close app issue --- app/Http/Controllers/Admin/GiftCardController.php | 6 +++--- app/Http/Controllers/Site/ReportController.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Admin/GiftCardController.php b/app/Http/Controllers/Admin/GiftCardController.php index f5d48e3..9466f9d 100644 --- a/app/Http/Controllers/Admin/GiftCardController.php +++ b/app/Http/Controllers/Admin/GiftCardController.php @@ -34,8 +34,8 @@ class GiftCardController extends Controller 'customer_id' => $customer->id ?? null, 'count' => $count, 'amount' => $amount, - 'mobile' => $request->mobile, - 'name' => $customer ? $customer->name : $request->name, + 'mobile' => $request->mobile ?? null, + 'name' => ($customer ? $customer->name : $request->name) ?? null, 'amount' => $amount, 'total' => $count*$amount, 'sts' => 1, @@ -64,7 +64,7 @@ class GiftCardController extends Controller GiftCardCodes::insert($codes); return response()->json([ - 'customer' => $customer, + 'customer' => $customer ?? null, 'order' => $gift, 'codes' => $gift->giftcardcodes, 'total' => $count*$amount, diff --git a/app/Http/Controllers/Site/ReportController.php b/app/Http/Controllers/Site/ReportController.php index 9939785..d83cc65 100644 --- a/app/Http/Controllers/Site/ReportController.php +++ b/app/Http/Controllers/Site/ReportController.php @@ -135,8 +135,8 @@ class ReportController extends Controller Cnt::where('key', 'goldir_closed')->update(['value' => "true"]); $liman_price = 0; }else{ - Cnt::where('key', 'app_closed')->update(['value' => "true"]); - Cnt::where('key', 'goldir_closed')->update(['value' => "true"]); + Cnt::where('key', 'app_closed')->update(['value' => "false"]); + Cnt::where('key', 'goldir_closed')->update(['value' => "false"]); } }