1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- declare (strict_types=1);
- namespace app\dao\diy;
- use app\dao\BaseDao;
- use app\model\diy\PageCategory;
- class PageCategoryDao extends BaseDao
- {
-
- protected function setModel(): string
- {
- return PageCategory::class;
- }
-
- public function getList(array $where, string $field = '*', int $page = 0, int $limit = 0)
- {
- return $this->search($where)->field($field)->when($page && $limit, function ($query) use ($page, $limit) {
- $query->page();
- })->order('sort desc')->select()->toArray();
- }
- }
|