fixed no parent bugs group & category

pull/49/head
A1Gard 4 months ago
parent 2bb6bf6931
commit 8e0e562bd3

@ -57,7 +57,9 @@ class CategoryController extends XController
$category->name = $request->input('name');
$category->subtitle = $request->input('subtitle');
$category->description = $request->input('description');
$category->parent_id = $request->input('parent_id');
if ($category->parent_id != ''){
$category->parent_id = $request->input('parent_id',null);
}
$category->slug = $this->getSlug($category);
if ($request->has('image')) {
$category->image = $this->storeFile('image', $category, 'categories');

@ -56,7 +56,9 @@ class GroupController extends XController
$group->name = $request->input('name');
$group->subtitle = $request->input('subtitle');
$group->description = $request->input('description');
$group->parent_id = $request->input('parent_id');
if ($group->parent_id != ''){
$group->parent_id = $request->input('parent_id',null);
}
$group->slug = $this->getSlug($group);
if ($request->has('image')){
$group->image = $this->storeFile('image',$group, 'groups');

Loading…
Cancel
Save