pull/1/head
wanghousheng 10 months ago
parent 5ed1641aae
commit ca7678cea6
  1. 10
      app/api/model/Article.php

@ -141,4 +141,14 @@ class Article extends ArticleModel
return $this->save(['is_delete' => 1]);
}
/**
* 获取文章总数量
* @param array $where
* @return int
*/
public static function getArticleTotal(array $where = []): int
{
return (new static)->where($where)->where('is_delete', '=', 0)->count();
}
}
Loading…
Cancel
Save