crudListIndex.stub 439 B

12345678910111213
  1. /**
  2. * 主页数据接口
  3. * @param array $where
  4. * @return array
  5. * @date {%DATE%}
  6. */
  7. public function getCrudListIndex(array $where = [])
  8. {
  9. [$page, $limit] = $this->getPageValue();
  10. $model = $this->dao->searchCrudModel($where, '{%FIELD%}', '{%KEY%} desc', {%WITH%});
  11. return ['count' => $model->count(), 'list' => $model->page($page ?: 1, $limit ?: 10)->select()->toArray()];
  12. }