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

89 lines
2.0 KiB

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;
  32. $grid->forward;
  33. $grid->repay;
  34. $grid->disableCreateButton();
  35. $grid->disableViewButton();
  36. $grid->disableEditButton();
  37. $grid->disableDeleteButton();
  38. $grid->paginate(1);
  39. $grid->disablePagination();
  40. $grid->disableRowSelector();
  41. $grid->actions(new CouponTieEdit());
  42. });
  43. return $content
  44. ->title('活动绑定')
  45. ->body(new Card($grid));
  46. }
  47. public function CouponTieForm(Content $content)
  48. {
  49. return $content
  50. ->title('活动绑定')
  51. ->body(new Card(new CouponTieForm()), function (Form $form) {
  52. });
  53. }
  54. /**
  55. * Make a show builder.
  56. *
  57. * @param mixed $id
  58. *
  59. * @return Show
  60. */
  61. // protected function detail($id)
  62. // {
  63. // return Show::make($id, new ImsCjdcMarket(), function (Show $show) {
  64. // });
  65. // }
  66. // /**
  67. // * Make a form builder.
  68. // *
  69. // * @return Form
  70. // */
  71. protected function form(Content $content)
  72. {
  73. return $content
  74. ->title('活动绑定')
  75. ->body(new Card(new CouponTieForm()));
  76. }
  77. }