feat: 新增视频分类列表接口

This commit is contained in:
2025-02-28 15:07:48 +08:00
parent f2034658a2
commit d37abdc77c
2 changed files with 23 additions and 0 deletions

View File

@@ -11,6 +11,26 @@ use app\admin\validate\v1\VideoCategoryValidate;
*/
class VideoCategory
{
/**
* 视频分类列表数据
*/
public function list()
{
$param = request()->param(['name' => '']);
$categorys = VideoCategoryModel::field([
'id',
'name',
])
->withSearch(['name'], [
'name' => $param['name']??null
])
->language(request()->lang_id)
->order(['sort' => 'asc', 'id' => 'desc'])
->select();
return success('获取成功', $categorys);
}
/**
* 视频分类分页数据
*/