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(DiarySleepLevel::findOrFail($id)); $show->field('id', __('Id')); $show->field('name', __('Name')); $show->field('pic', __('Pic')); $show->field('hover_pic', __('Hover pic')); $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 DiarySleepLevel()); $form->text('name', __('级别名')); $form->image('pic', __('未选中的图片')); $form->image('hover_pic', __('选中时的图片')); $form->color('color', __('文字颜色')); $form->number('rank', __('排序 越大越靠前')); return $form; } }