model()->whereNull('club_id'); $grid->column('id')->sortable(); $grid->column('user_id'); $grid->column('shop_id'); $grid->column('name'); $grid->column('country_code'); $grid->column('phone'); $grid->column('longitude'); $grid->column('latitude'); $grid->column('address_name'); $grid->column('address_detail'); $grid->column('created_at'); $grid->column('updated_at')->sortable(); $grid->filter(function (Grid\Filter $filter) { $filter->equal('id'); }); }); } /** * Make a show builder. * * @param mixed $id * * @return Show */ protected function detail($id) { return Show::make($id, new WxShopContact(), function (Show $show) { $show->field('id'); $show->field('user_id'); $show->field('shop_id'); $show->field('name'); $show->field('country_code'); $show->field('phone'); $show->field('longitude'); $show->field('latitude'); $show->field('address_name'); $show->field('address_detail'); $show->field('created_at'); $show->field('updated_at'); }); } /** * Make a form builder. * * @return Form */ protected function form() { return Form::make(new WxShopContact(), function (Form $form) { $form->display('id'); $form->text('user_id')->required(); $form->text('shop_id')->required(); $form->text('name')->required(); $form->text('country_code')->default(86)->required(); $form->text('phone')->required(); $form->text('longitude')->required(); $form->text('latitude')->required(); $form->text('address_name')->required(); $form->text('address_detail')->required(); $form->display('created_at'); $form->display('updated_at'); $form->deleting(function (Form $form){ global $__MINI_GLOBAL_TENANT_ID__; if($__MINI_GLOBAL_TENANT_ID__ > 0){ return $form->response()->error('权限不足,不可以删除其他分站对象'); } }); }); } }