where('status', 'normal') ->where($condition) ->field($field) ->orderRaw($order); if ($paginate) { $paginateArr = explode(',', $paginate); $listRows = is_numeric($paginate) ? $paginate : (is_numeric($paginateArr[0]) ? $paginateArr[0] : $row); $config = []; $config['var_page'] = $paginateArr[2] ?? 'tpage' . self::$tagCount; $config['path'] = $paginateArr[3] ?? ''; $config['fragment'] = $paginateArr[4] ?? ''; $config['query'] = request()->get(); $list = $tagModel->paginate($listRows, ($paginateArr[1] ?? false), $config); } else { $list = $tagModel->limit($limit)->cache($cacheKey, $cacheExpire, 'shop')->select(); } return $list; } }