调整筛选项

This commit is contained in:
2021-11-29 16:39:38 +08:00
parent 777caa187e
commit d2643c8f7c
3 changed files with 35 additions and 18 deletions

View File

@@ -24,6 +24,9 @@ class IndexController extends AdminController
$grid->filter(function ($filter) {
$filter->column(1 / 2, function ($filter) {
$filter->like('title', '广告名称');
});
$filter->column(1 / 2, function ($filter) {
$filter->like('category.id', '分类名称')->select(Category::selectOptions(function ($model) {
return $model->where('status', 1)->where('type', Category::TYPE_ADVERT);
}, '所有分类'));