refactor: 附件
This commit is contained in:
@@ -22,4 +22,16 @@ class AttachmentCategoryModel extends AttachmentCategoryBaseModel
|
||||
{
|
||||
return $query->where('language_id', '=', $language);
|
||||
}
|
||||
|
||||
// 上级id范围查询
|
||||
public function scopeParent($query, $pid)
|
||||
{
|
||||
return $query->where('pid', '=', $pid);
|
||||
}
|
||||
|
||||
// 是否显示状态范围查询
|
||||
public function scopeIsShow($query, bool $is_show)
|
||||
{
|
||||
return $query->where('is_show', '=', (int)$is_show);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user