['type'] ]; } /** * @notes 文章/帮助分类列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author Tab * @date 2021/7/13 14:26 */ public function lists(): array { $lists = ArticleCategory::field(['id', 'name', 'is_show', 'sort', 'create_time']) ->where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->order('sort', 'desc') ->select() ->toArray(); return $lists; } /** * @notes 文章/帮助分类总记录数 * @return int * @author Tab * @date 2021/7/13 14:27 */ public function count(): int { return ArticleCategory::where($this->searchWhere)->count(); } }