初步完成
This commit is contained in:
@@ -20,9 +20,12 @@ class IndexController extends AdminController
|
||||
$grid->filter(function ($filter) {
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->like('title', '文章标题');
|
||||
$filter->like('category_id', '所属分类')->select(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW]);
|
||||
}, '所有分类'));
|
||||
$filter->equal('category_id', '所属分类')
|
||||
->select(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)
|
||||
->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW]);
|
||||
}, '所有分类'));
|
||||
|
||||
});
|
||||
|
||||
$filter->disableIdFilter();
|
||||
@@ -57,6 +60,7 @@ class IndexController extends AdminController
|
||||
'min' => '必须选择所属分类',
|
||||
]);
|
||||
$form->textarea('description', '内容简介');
|
||||
$form->text('tenure', '任期')->help('领导班子需要添加此数据');
|
||||
$form->image('cover', '封面')
|
||||
->move('images/' . date('Y/m/d'))
|
||||
->removable()
|
||||
|
||||
Reference in New Issue
Block a user