mirror of https://github.com/1099438829/apeblog
36 lines
879 B
PHP
36 lines
879 B
PHP
<?php
|
|
|
|
|
|
namespace app\common\model;
|
|
|
|
|
|
use app\admin\model\BaseModel;
|
|
|
|
/**
|
|
* Class DocumentArticle
|
|
* @package app\admin\model\system
|
|
* @author 李玉坤
|
|
* @date 2021-02-15 23:22
|
|
*/
|
|
class DocumentArticle extends BaseModel
|
|
{
|
|
/**
|
|
* 列表
|
|
* @param $where
|
|
* @return array
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @author 李玉坤
|
|
* @date 2021-02-15 23:24
|
|
*/
|
|
public static function systemPage($where): array
|
|
{
|
|
$model = new self;
|
|
$count = self::counts($model);
|
|
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'],(int)$where['limit']);
|
|
$data = $model->select();
|
|
if ($data) $data = $data->toArray();
|
|
return compact('data','count');
|
|
}
|
|
} |