From 61176335d7ec3ea436a9ded3b9d8841abd596722 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 21 Sep 2021 15:51:41 -0700 Subject: [PATCH] Improved category_type with strtolower() to make it case insensitive Signed-off-by: snipe --- app/Http/Controllers/Api/CategoriesController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/Api/CategoriesController.php b/app/Http/Controllers/Api/CategoriesController.php index 9010bf1500..9b4fa51349 100644 --- a/app/Http/Controllers/Api/CategoriesController.php +++ b/app/Http/Controllers/Api/CategoriesController.php @@ -63,6 +63,7 @@ class CategoriesController extends Controller $this->authorize('create', Category::class); $category = new Category; $category->fill($request->all()); + $category->category_type = strtolower($request->input('category_type')); $category = $request->handleImages($category); if ($category->save()) { @@ -103,6 +104,7 @@ class CategoriesController extends Controller $this->authorize('update', Category::class); $category = Category::findOrFail($id); $category->fill($request->all()); + $category->category_type = strtolower($request->input('category_type')); $category = $request->handleImages($category); if ($category->save()) {