新增分类排序

This commit is contained in:
augushong
2020-10-29 15:17:04 +08:00
parent 8f7f4c826a
commit 04d7bd0743
6 changed files with 23 additions and 3 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);
}