column('id', __('Id')); $grid->column('name', __('标签名')); $grid->column('color', __('颜色')); $grid->column('rank', __('排序 越大越靠前')); $grid->column('created_at', __('创建时间')); $grid->column('updated_at', __('更新时间')); return $grid; } /** * Make a show builder. * * @param mixed $id * @return Show */ protected function detail($id) { $show = new Show(DiaryMoodTag::findOrFail($id)); $show->field('id', __('Id')); $show->field('name', __('Name')); $show->field('color', __('Color')); $show->field('rank', __('Rank')); $show->field('created_at', __('Created at')); $show->field('updated_at', __('Updated at')); $show->field('deleted_at', __('Deleted at')); return $show; } /** * Make a form builder. * * @return Form */ protected function form() { $form = new Form(new DiaryMoodTag()); $form->text('name', __('标签名')); $form->color('color', __('颜色')); $form->number('rank', __('排序 越大越靠前')); return $form; } }