链街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.

70 lines
1.6 KiB

  1. <?php
  2. namespace App\Admin\Controllers;
  3. use App\Admin\Repositories\LanzuMmWithdraw;
  4. use Dcat\Admin\Form;
  5. use Dcat\Admin\Grid;
  6. use Dcat\Admin\Show;
  7. use Dcat\Admin\Controllers\AdminController;
  8. use Encore\Admin\Facades\Admin;
  9. use Illuminate\Support\Facades\Auth;
  10. class LanzuMmWithdrawController extends AdminController
  11. {
  12. /**
  13. * Make a grid builder.
  14. *
  15. * @return Grid
  16. */
  17. protected function grid()
  18. {
  19. return Grid::make(new LanzuMmWithdraw(), function (Grid $grid) {
  20. $grid->id->sortable();
  21. $grid->mm_id('提现');
  22. $grid->money;
  23. $grid->status('提现状态');
  24. $grid->created_at('提现时间');
  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 LanzuMmWithdraw(), function (Show $show) {
  40. $show->id;
  41. $show->mm_id;
  42. $show->money;
  43. $show->status;
  44. $show->created_at;
  45. $show->updated_at;
  46. });
  47. }
  48. /**
  49. * Make a form builder.
  50. *
  51. * @return Form
  52. */
  53. protected function form()
  54. {
  55. return Form::make(new LanzuMmWithdraw(), function (Form $form) {
  56. $form->display('id');
  57. $form->text('mm_id');
  58. $form->text('money');
  59. $form->display('created_at');
  60. $form->display('updated_at');
  61. });
  62. }
  63. }