@ -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();