| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace App\Module\Game\AdminControllers;
- use App\Module\Game\Models\GameUserSkin;
- use App\Module\Game\Repositorys\GameUserSkinRepository;
- use Dcat\Admin\Form;
- use Dcat\Admin\Grid;
- use Dcat\Admin\Show;
- use UCore\DcatAdmin\AdminController;
- use Spatie\RouteAttributes\Attributes\Resource;
- /**
- * 用户皮肤管理控制器
- *
- * @Resource(
- * resource: 'game-user-skins',
- * names: [
- * 'index' => 'admin.game.user-skins.index',
- * 'show' => 'admin.game.user-skins.show',
- * 'create' => 'admin.game.user-skins.create',
- * 'store' => 'admin.game.user-skins.store',
- * 'edit' => 'admin.game.user-skins.edit',
- * 'update' => 'admin.game.user-skins.update',
- * 'destroy' => 'admin.game.user-skins.destroy'
- * ]
- * )
- */
- class GameUserSkinController extends AdminController
- {
- /**
- * 数据仓库
- *
- * @var GameUserSkinRepository
- */
- protected GameUserSkinRepository $repository;
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->repository = new GameUserSkinRepository();
- }
- /**
- * 列表页面
- *
- * @return Grid
- */
- protected function grid(): Grid
- {
- return $this->repository->grid();
- }
- /**
- * 详情页面
- *
- * @param mixed $id
- * @return Show
- */
- protected function detail($id): Show
- {
- return $this->repository->detail($id);
- }
- /**
- * 创建页面
- *
- * @return Form
- */
- protected function form(): Form
- {
- return $this->repository->form();
- }
- }
|