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

94 lines
2.1 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Controllers;
  3. use Dcat\Admin\Form;
  4. use Dcat\Admin\Grid;
  5. use Dcat\Admin\Show;
  6. use Dcat\Admin\Layout\Content;
  7. use Dcat\Admin\Controllers\AdminController;
  8. use Dcat\Admin\Widgets\Card;
  9. use App\Admin\Repositories\CouponTie;
  10. use App\Admin\Forms\CouponTieForm;
  11. use App\Admin\Extensions\CouponTieEdit;
  12. class CouponTieController extends AdminController
  13. {
  14. /**
  15. * Make a grid builder.
  16. *
  17. * @return Grid
  18. */
  19. protected function grid()
  20. {
  21. return Grid::make(new CouponTie(), function (Grid $grid) {
  22. $grid->activity->sortable();
  23. $grid->forward->sortable();
  24. $grid->repay->sortable();
  25. });
  26. }
  27. public function CouponTieList(Content $content)
  28. {
  29. $grid = Grid::make(new CouponTie(), function (Grid $grid) {
  30. $grid->id;
  31. $grid->activity->sortable();
  32. $grid->forward->sortable();
  33. $grid->repay->sortable();
  34. $grid->disableViewButton();
  35. $grid->disableEditButton();
  36. $grid->disableDeleteButton();
  37. $grid->actions(new CouponTieEdit());
  38. });
  39. return $content
  40. ->title('活动绑定')
  41. ->body(new Card($grid));
  42. }
  43. public function CouponTieForm(Content $content)
  44. {
  45. return $content
  46. ->title('活动绑定')
  47. ->body(new Card(new CouponTieForm()), function (Form $form) {
  48. });
  49. }
  50. /**
  51. * Make a show builder.
  52. *
  53. * @param mixed $id
  54. *
  55. * @return Show
  56. */
  57. // protected function detail($id)
  58. // {
  59. // return Show::make($id, new ImsCjdcMarket(), function (Show $show) {
  60. // });
  61. // }
  62. // /**
  63. // * Make a form builder.
  64. // *
  65. // * @return Form
  66. // */
  67. protected function form(Content $content)
  68. {
  69. return $content
  70. ->title('活动绑定')
  71. ->body(new Card(new CouponTieForm()));
  72. }
  73. // /**
  74. // * 服务商信息
  75. // * @return \Illuminate\Http\JsonResponse
  76. // */
  77. // protected function getMpInfo()
  78. // {
  79. // }
  80. }