From 11619dcdb124a56a8b6a9ed826e0ddf0eec3309b Mon Sep 17 00:00:00 2001 From: A1Gard Date: Wed, 4 Dec 2024 16:27:21 +0330 Subject: [PATCH] fixed parent bug --- app/Http/Controllers/Admin/CategoryController.php | 2 +- app/Http/Controllers/Admin/GroupController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/CategoryController.php b/app/Http/Controllers/Admin/CategoryController.php index 1229ac6..d68be70 100644 --- a/app/Http/Controllers/Admin/CategoryController.php +++ b/app/Http/Controllers/Admin/CategoryController.php @@ -58,7 +58,7 @@ class CategoryController extends XController $category->subtitle = $request->input('subtitle'); $category->icon = $request->input('icon'); $category->description = $request->input('description'); - if ($category->parent_id != ''){ + if ($category->parent_id == ''){ $category->parent_id = $request->input('parent_id',null); } if ($request->has('canonical') && trim($request->input('canonical')) != ''){ diff --git a/app/Http/Controllers/Admin/GroupController.php b/app/Http/Controllers/Admin/GroupController.php index a226794..51a4ee1 100644 --- a/app/Http/Controllers/Admin/GroupController.php +++ b/app/Http/Controllers/Admin/GroupController.php @@ -56,7 +56,7 @@ class GroupController extends XController $group->name = $request->input('name'); $group->subtitle = $request->input('subtitle'); $group->description = $request->input('description'); - if ($group->parent_id != ''){ + if ($group->parent_id == ''){ $group->parent_id = $request->input('parent_id',null); } if ($request->has('canonical') && trim($request->input('canonical')) != ''){