model()->whereIn('id', [1, 2, 10]); $grid->column('id')->sortable(); $grid->column('desc', '标题'); $grid->column('value', '值'); $grid->column('created_at'); $grid->column('updated_at')->sortable(); $grid->disableDeleteButton(); $grid->disableCreateButton(); $grid->disableViewButton(); }); } /** * Make a show builder. * * @return Show */ protected function detail($id) { return Show::make($id, new Config(), function (Show $show) { $show->field('id'); $show->field('key'); $show->field('value'); $show->field('desc'); $show->field('created_at'); $show->field('updated_at'); }); } /** * Make a form builder. * * @return Form */ protected function form() { return Form::make(new Config(), function (Form $form) { $form->display('id'); $form->editor('value', '值')->required(); $form->display('desc', '标题'); $form->disableViewButton(); $form->disableDeleteButton(); }); } }