From 981ffabf07adce0165c0479efa58ccd1f9bba56e Mon Sep 17 00:00:00 2001 From: A1Gard Date: Tue, 10 Sep 2024 02:10:55 +0330 Subject: [PATCH] fixed use default --- app/Http/Controllers/Admin/AreaController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/AreaController.php b/app/Http/Controllers/Admin/AreaController.php index 3f4b6b0..747953c 100644 --- a/app/Http/Controllers/Admin/AreaController.php +++ b/app/Http/Controllers/Admin/AreaController.php @@ -82,8 +82,10 @@ class AreaController extends Controller if ($request->has('use_default')){ $area->use_default = 1; - $area->save(); + }else{ + $area->use_default = 0; } + $area->save(); return redirect()->back()->with(['message' => __('area :NAME of website updated', ['NAME' => $area->name])]);