refactor: 修改几在模块支持多分类筛选
This commit is contained in:
@@ -58,6 +58,10 @@ class AttachmentModel extends AttachmentBaseModel
|
||||
public function scopeCategoryId($query, $value)
|
||||
{
|
||||
if (empty($value)) return;
|
||||
if (is_array($value) || str_contains($value, ',')) {
|
||||
$query->whereIn('category_id', $value);
|
||||
return;
|
||||
}
|
||||
$query->where('category_id', '=', $value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user