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

83 lines
1.9 KiB

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