mcicek34 / social
Yii2 社交模块
Requires
- php: >=7.0
- yiisoft/yii2: ~2.0.13
Requires (Dev)
- phpunit/phpunit: 8.*.*
This package is not auto-updated.
Last update: 2024-09-22 17:16:59 UTC
README
Internet Programming Project Homework
Mustafa ÇİÇEK
160202055
为您的网站添加社交模块所需步骤
1-) 在Advanced目录中的composer.json文件中,将模块的链接添加到repositories部分。{ "type": "vcs", "url": "https://github.com/mcicek34/social.git" },
2-) 在Advanced目录中的advanced/backend/config/main.php,advanced/frontend/config/main.php,advanced/api/config/main.php文件中的modules部分添加您的模块。
3-) 在执行vagrant ssh后,通过cd /var/www/advanced进入目录,运行composer update或composer require mcicek34/social "dev-main"命令将我们添加的repo添加到系统中。
4-) 通过执行vagrant ssh中的"php yii migrate --migrationPath=@vendor/mcicek34/social/migrations --interactive=0"命令,将迁移文件上载到数据库中,添加模块中使用的表格。
执行这四个步骤后,迁移中的表格将被添加到数据库中,github中的作业模块将位于portal/vendor/mcicek34目录下的social中,可访问。
面板视图
主页 => http://advanced/frontend/web/index.php?r=social/default/index
分享 => http://advanced/frontend/web/index.php?r=/social/share/index
朋友 => http://advanced/frontend/web/index.php?r=social/friendship/index
用户 => http://advanced/frontend/web/index.php?r=social/kullanicilar/index
用户 => http://advanced/frontend/web/index.php?r=social%2Fkullanicilar%2Fview&id=2
备注
1-) 用户面板打开时;从迁移创建的用户表中的值被提取并添加到表中,并在userlist中显示。
2-) 分享面板打开时;从迁移创建的share表中提取的值被添加到表中,并在sharelist中显示。
3-) 朋友面板打开时;从迁移创建的friendship表中提取的值被添加到表中,并在friendshiplist中显示。