refactor: 修改文章列表

This commit is contained in:
2025-01-13 17:48:37 +08:00
parent 276f550e7a
commit 5d1f4cc191
3 changed files with 15 additions and 3 deletions

View File

@@ -16,6 +16,12 @@ class ArticleModel extends ArticleBaseModel
// 软删除标记数据字段
protected $deleteTime = 'deleted_at';
// 关联分类
public function category()
{
return $this->belongsTo(ArticleCategoryModel::class, 'category_id', 'id');
}
// 搜索名称
public function searchTitleAttr($query, $value, $data)
{