column('student_id')->using(config('map.students')); $grid->column('entrust_time'); $grid->column('take_back_person')->using(config('map.parent_ids')); $grid->column('take_back_desc'); $grid->column('take_back_photos'); $grid->column('sign'); $grid->filter(function (Grid\Filter $filter) { $filter->panel(); $filter->date('created_at')->datetime()->width(4); $filter->equal('student_id','输入/选择学生')->select(config('map.students'))->width(4); }); }); } /** * Make a show builder. * * @param mixed $id * * @return Show */ protected function detail($id) { return Show::make($id, new TakebackEntrustment(), function (Show $show) { $show->row(function (Show\Row $show) { $show->field('content','接回委托详情') ->width(8) ->unescape() ->as(function () { $html = ''; $html .= '
'; $html .= '
接回对象:' . config('map.students')[$this->student_id] . '
'; $html .= '
接回家长:' . config('map.parent_ids')[$this->take_back_person] . '
'; $html .= '
接回时间:' . $this->entrust_time . '
'; $html .= '
接回说明:' . $this->take_back_desc . '
'; $html .= '
接回照片:
'; $html .= ''; $html .= '
签名:' . $this->sign . '
'; $html .= '
'; return $html; }); }); }); } /** * Make a form builder. * * @return Form */ protected function form() { return Form::make(new TakebackEntrustment(), function (Form $form) { $form->text('student_id'); $form->text('entrust_time'); $form->text('take_back_person'); $form->text('take_back_desc'); $form->text('take_back_photos'); $form->text('sign'); }); } }