新增分类排序

This commit is contained in:
augushong
2020-10-28 18:32:29 +08:00
parent 954c45b9eb
commit ca776744cb
6 changed files with 23 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ class Category extends Model
if(empty(self::$allCategory)){
$model_list = Category::where('type',$type)->select();
$model_list = Category::where('type',$type)->order('sort asc')->select();
self::$allCategory = array2level($model_list,0,0);
}