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

84 lines
1.9 KiB

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