fix: 修复文章详情没有评论数据显示问题

This commit is contained in:
2025-06-07 15:00:46 +08:00
parent dbf693d674
commit 01a2bfe4c7
3 changed files with 171 additions and 153 deletions

View File

@@ -16,4 +16,16 @@ class ArticleLeaveMessageModel extends ArticleLeaveMessageBaseModel
use SoftDelete;
// 软删除字段
protected $deleteTime = 'deleted_at';
// 文章文章范围查询
public function scopeArticle($query, $article_id)
{
$query->where('article_id', '=', $article_id);
}
// 审核状态范围查询
public function scopeAudited($query, bool $is_audited = true)
{
$query->where('is_audited', '=', (int)$is_audited);
}
}