field('id,parent_id,title,brief_intr,image,sort') ->where(function ($query) use ($parentId) { if ($parentId) { $query->where('parent_id', $parentId); } }) ->order('sort desc,id desc') ->paginate($pageSize, false, ['page' => $page]); return $categoryList; } }