disableAll(); $helper->columnIdDesc(); $grid->column('name'); $grid->column('address'); $helper->columnModelCats('status',null,'状态',true); $helper->columnAt('create_time'); $grid->filter(function (Grid\Filter $filter) { $helper= new FilterHelper($filter,$this); $helper->equalRadioModelCats('status'); $filter->expand(); $filter->panel(); }); $grid->showCreateButton(); $grid->actions(function (Grid\Displayers\Actions $actions) { // $actions->disableDelete(); $actions->disableView(); }); }); } /** * Make a show builder. * * @param mixed $id * * @return Show */ protected function detail($id) { return Show::make($id, new ReceiveAddressRepository(), function (Show $show) { $show->field('id'); $show->field('name'); $show->field('address'); $show->field('status'); }); } /** * Make a form builder. * * @return Form */ protected function form() { return Form::make(new ReceiveAddressRepository(), function (Form $form) { $form->text('name','备注名字'); $form->text('address','地址'); $form->select('status','选择')->options(RECEIVE_ADDRESS_STATUS::getValueDescription()); }); } }