Improved category_type with strtolower() to make it case insensitive

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-09-21 15:51:41 -07:00
parent 9b52c61d95
commit 61176335d7

View file

@ -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()) {