GameRewardGroupPityCountController.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace App\Module\Game\AdminControllers;
  3. use App\Module\Game\AdminRepositories\GameRewardGroupPityCountRepository;
  4. use Dcat\Admin\Form;
  5. use Dcat\Admin\Grid;
  6. use Dcat\Admin\Show;
  7. use Spatie\RouteAttributes\Attributes\Resource;
  8. use UCore\DcatAdmin\AdminController;
  9. /**
  10. * 奖励组保底计数控制器
  11. *
  12. * 路由: /admin/game/reward-group-pity-counts
  13. */
  14. #[Resource('game-reward-group-pity-counts', names: 'dcat.admin.game-reward-group-pity-counts')]
  15. class GameRewardGroupPityCountController extends AdminController
  16. {
  17. /**
  18. * 获取仓库实例
  19. *
  20. * @return GameRewardGroupPityCountRepository
  21. */
  22. protected function repository(): GameRewardGroupPityCountRepository
  23. {
  24. return new GameRewardGroupPityCountRepository();
  25. }
  26. /**
  27. * 列表页面
  28. *
  29. * @return Grid
  30. */
  31. protected function grid(): Grid
  32. {
  33. return $this->repository()->grid();
  34. }
  35. /**
  36. * 详情页面
  37. *
  38. * @param mixed $id
  39. * @return Show
  40. */
  41. protected function detail($id): Show
  42. {
  43. return $this->repository()->detail($id);
  44. }
  45. /**
  46. * 表单页面
  47. *
  48. * @return Form
  49. */
  50. protected function form(): Form
  51. {
  52. return $this->repository()->form();
  53. }
  54. }