链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.7 KiB

  1. <?php
  2. namespace App\Admin\Controllers;
  3. use App\Admin\Repositories\LanzuCsWithdraw;
  4. use Dcat\Admin\Form;
  5. use Dcat\Admin\Grid;
  6. use Dcat\Admin\Show;
  7. use Dcat\Admin\Controllers\AdminController;
  8. class LanzuCsWithdrawController extends AdminController
  9. {
  10. /**
  11. * Make a grid builder.
  12. *
  13. * @return Grid
  14. */
  15. protected function grid()
  16. {
  17. return Grid::make(new LanzuCsWithdraw(), function (Grid $grid) {
  18. $grid->id->sortable();
  19. $grid->cs_id;
  20. $grid->money;
  21. $grid->status;
  22. $grid->is_pay;
  23. $grid->created_at;
  24. $grid->updated_at->sortable();
  25. $grid->filter(function (Grid\Filter $filter) {
  26. $filter->equal('id');
  27. });
  28. });
  29. }
  30. /**
  31. * Make a show builder.
  32. *
  33. * @param mixed $id
  34. *
  35. * @return Show
  36. */
  37. protected function detail($id)
  38. {
  39. return Show::make($id, new LanzuCsWithdraw(), function (Show $show) {
  40. $show->id;
  41. $show->cs_id;
  42. $show->money;
  43. $show->status;
  44. $show->is_pay;
  45. $show->created_at;
  46. $show->updated_at;
  47. });
  48. }
  49. /**
  50. * Make a form builder.
  51. *
  52. * @return Form
  53. */
  54. protected function form()
  55. {
  56. return Form::make(new LanzuCsWithdraw(), function (Form $form) {
  57. $form->display('id');
  58. $form->text('cs_id');
  59. $form->text('money');
  60. $form->text('status');
  61. $form->text('is_pay');
  62. $form->display('created_at');
  63. $form->display('updated_at');
  64. });
  65. }
  66. }