column('id', __('Id')); $grid->column('name', __('系统名')); $grid->column('hotline_number', __('咨询电话')); $grid->column('hotline_number_pic', __('热线图片'))->lightbox([ 'width' => 100 ]); $grid->column('hot_search', __('热搜索关键词')); return $grid; } /** * Make a show builder. * * @param mixed $id * @return Show */ protected function detail($id) { $show = new Show(SysConfig::findOrFail($id)); $show->field('id', __('Id')); $show->field('name', __('系统名')); $show->field('hotline_number', __('咨询电话')); $show->field('hotline_number_pic', __('热线对应的图片')); $show->field('hot_search', __('热搜索关键词')); return $show; } /** * Make a form builder. * * @return Form */ protected function form() { $form = new Form(new SysConfig()); $form->text('name', __('系统名')); $form->text('hotline_number', __('咨询电话')); $form->image('hotline_number_pic', __('热线图片'))->uniqueName()->move('pics/'.date('Y').'/'.date('m'))->rules('required'); $form->text('hot_search', __('热搜索关键词')); return $form; } }