searchWhere) ->field(['id', 'name', 'sort', 'is_show', 'langs']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); foreach ($itemCate as $k => $v) { $itemCate[$k]['langs'] = json_decode($v['langs'], JSON_UNESCAPED_UNICODE); } return $itemCate; } /** * @notes 获取项目分类数量 * @return int * @author likeadmin * @date 2024/01/16 13:23 */ public function count(): int { return ItemCate::where($this->searchWhere)->count(); } }