GoodsCate.php 322 B

1234567891011121314
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. // 商品分类
  5. class GoodsCate extends Model
  6. {
  7. public static function getCateTree()
  8. {
  9. $all_cate = self::field('id,title,pid,lev')->where(['status'=>1,'is_deleted'=>0])->order('sort desc ,id desc')->select();
  10. return make_tree($all_cate);
  11. }
  12. }