Upgrade package category and dependencies for php8.0
This commit is contained in:
@@ -121,10 +121,7 @@ class Categories
|
||||
|
||||
public static function create($data)
|
||||
{
|
||||
$node = CategoryTrees::create($data);
|
||||
$data['category_id'] = $node->id;
|
||||
$category = Category::create($data);
|
||||
return $category;
|
||||
return Category::create($data);
|
||||
}
|
||||
|
||||
public static function update($data, $id = false)
|
||||
@@ -132,14 +129,14 @@ class Categories
|
||||
$id = $id ? $id : $data['id'];
|
||||
$category = self::get($id);
|
||||
$ret = $category->update($data);
|
||||
CategoryTrees::update($data, $category->category_id);
|
||||
// CategoryTrees::update($data, $category->category_id);
|
||||
return $category;
|
||||
}
|
||||
|
||||
public static function destroy($id)
|
||||
{
|
||||
$category = self::get($id);
|
||||
CategoryTrees::destroy($category->category_id);
|
||||
// $category = self::get($id);
|
||||
// CategoryTrees::destroy($category->category_id);
|
||||
return Category::destroy($id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user