column('id')->sortable(); $grid->column('user.phone')->copyable(); $grid->column('desc'); // $grid->column('type'); $grid->column('points'); $grid->column('old_points'); $grid->column('created_at')->sortable(); $grid->model()->orderBy('created_at', 'desc'); // $grid->column('updated_at')->sortable(); $grid->disableActions(); $grid->filter(function (Grid\Filter $filter) { $filter->panel(false); $filter->equal('user.phone')->width(3); }); }); } /** * Make a show builder. * * @param mixed $id * * @return Show */ protected function detail($id) { return Show::make($id, new PointsLog(), function (Show $show) { $show->field('id'); $show->field('user_id'); $show->field('type'); $show->field('points'); $show->field('old_points'); $show->field('desc'); $show->field('created_at'); $show->field('updated_at'); }); } /** * Make a form builder. * * @return Form */ protected function form() { return Form::make(new PointsLog(), function (Form $form) { $form->display('id'); $form->text('user_id'); $form->text('type'); $form->text('points'); $form->text('old_points'); $form->text('desc'); $form->display('created_at'); $form->display('updated_at'); }); } }