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

73 lines
1.8 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Controllers;
  3. use App\Admin\Repositories\LanzuMmWithdraw;
  4. use App\Models\LanzuMmWithdraw as MmWithdraw;
  5. use Dcat\Admin\Form;
  6. use Dcat\Admin\Grid;
  7. use Dcat\Admin\Show;
  8. use Dcat\Admin\Controllers\AdminController;
  9. use Encore\Admin\Facades\Admin;
  10. use Illuminate\Support\Facades\Auth;
  11. class LanzuMmWithdrawController extends AdminController
  12. {
  13. /**
  14. * Make a grid builder.
  15. *
  16. * @return Grid
  17. */
  18. protected function grid()
  19. {
  20. return Grid::make(new LanzuMmWithdraw(['mmInfo']), function (Grid $grid) {
  21. $grid->id->sortable();
  22. //$grid->mm_id('提现');
  23. $grid->column('mmInfo.name','经理名');
  24. $grid->money;
  25. $grid->status('提现状态')->using([-1=>'拒绝',0=>'审核中',1=>'通过'])
  26. ->label([-1=>'danger',0=>'default',1=>'success']);
  27. $grid->created_at('提现时间');
  28. $grid->filter(function (Grid\Filter $filter) {
  29. $filter->equal('id');
  30. });
  31. });
  32. }
  33. /**
  34. * Make a show builder.
  35. *
  36. * @param mixed $id
  37. *
  38. * @return Show
  39. */
  40. protected function detail($id)
  41. {
  42. return Show::make($id, new LanzuMmWithdraw(), function (Show $show) {
  43. $show->id;
  44. $show->mm_id;
  45. $show->money;
  46. $show->status;
  47. $show->created_at;
  48. $show->updated_at;
  49. });
  50. }
  51. /**
  52. * Make a form builder.
  53. *
  54. * @return Form
  55. */
  56. protected function form()
  57. {
  58. return Form::make(new LanzuMmWithdraw(), function (Form $form) {
  59. $form->display('id');
  60. $form->text('mm_id');
  61. $form->text('money');
  62. $form->display('created_at');
  63. $form->display('updated_at');
  64. });
  65. }
  66. }