refactor: 修改视频分类列表接口
This commit is contained in:
@@ -25,6 +25,7 @@ class VideoCategory
|
||||
'name' => $param['name']??null
|
||||
])
|
||||
->language(request()->lang_id)
|
||||
->isShow()
|
||||
->order(['sort' => 'asc', 'id' => 'desc'])
|
||||
->select();
|
||||
|
||||
|
||||
@@ -37,4 +37,10 @@ class VideoCategoryModel extends VideoCategoryBaseModel
|
||||
{
|
||||
$query->where('language_id', '=', $value);
|
||||
}
|
||||
|
||||
// 显示状态查询
|
||||
public function scopeIsShow($query, bool $value = true)
|
||||
{
|
||||
$query->where('is_show', '=', (int)$value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user