canberkdeniz95 / yii2-130201092
Yii2 Players 模块
Requires
- php: >=7.0
- yiisoft/yii2: ~2.0.13
Requires (Dev)
- phpunit/phpunit: 8.*.*
This package is not auto-updated.
Last update: 2024-09-26 12:27:09 UTC
README
首先,您需要在计算机上安装 vagrant 和 VM。您可以从以下网站进行安装:[vagrantup.com](https://www.vagrantup.com/) 和 [oracle.com/tr/virtualization/virtualbox/](https://www.oracle.com/tr/virtualization/virtualbox/)
步骤 1:安装 yiisoft/yii2-app-advanced。在控制台中输入 "cd /var/www/" 后,输入 "composer create-project --prefer-dist yiisoft/yii2-app-advanced advanced" 以完成安装。
步骤 2:使用 Github 链接进行克隆。在控制台进入 /var/www/advanced 目录后,输入 "composer require --prefer-dist canberkdeniz95/yii2-130201092 "dev-main""
步骤 3:在 advanced/backend/config/main.php 的 'modules' -> 'content' 下,我们需要添加 'players' -> 'canberkdeniz95\players\module'。
步骤 4:将模块中的 migrations 文件夹中 .php 扩展名的文件复制到 advanced/console/migrations 中,并在控制台中运行 "migrate up" 命令。这样我们就得到了数据模式。
步骤 5:通过运行 "vagrant up" 命令启动机器,并可以通过以下图片访问。
模块视图
1- 通过 [http://advanced/backend/web/index.php?r=players/players/index](http://advanced/backend/web/index.php?r=players/players/index) 链接访问玩家表。在这个屏幕上可以进行添加、删除、更新玩家的操作。
2- 通过 [http://advanced/backend/web/index.php?r=players/teams/index](http://advanced/backend/web/index.php?r=players/teams/index) 链接访问团队表。在这个屏幕上可以进行添加、删除、更新团队的操作。
3- 最后,通过 [http://advanced/backend/web/index.php?r=players%2Ftransfer%2Findex](http://advanced/backend/web/index.php?r=players%2Ftransfer%2Findex) 链接执行转会操作。
4- 转会操作允许玩家从一支队伍转到另一支队伍,并改变玩家的队伍。操作完成后,再次访问 [http://advanced/backend/web/index.php?r=players/teams/index](http://advanced/backend/web/index.php?r=players/teams/index) 链接,可以看到玩家的队伍已更改。