fix: 文章详情推荐文章
This commit is contained in:
@@ -32,6 +32,11 @@ class ArticleModel extends ArticleBaseModel
|
||||
// 文章分类范围查询
|
||||
public function scopeCategory($query, $category)
|
||||
{
|
||||
if (is_null($category)) return;
|
||||
if (is_array($category)) {
|
||||
$query->where('category_id', 'in', $category);
|
||||
return;
|
||||
}
|
||||
$query->where('category_id', '=', $category);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user