tez / yii2-app-advanced
Yii 2 高级应用模板
2.0.1
2014-12-07 16:42 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
- yiisoft/yii2-swiftmailer: *
Requires (Dev)
This package is not auto-updated.
Last update: 2024-09-28 18:21:14 UTC
README
在安装此模板之前,您需要购买此主题 http://demo.interface.club/?theme=brain 我已基于此构建了管理界面。主题不是开源的,因此我不能公开它。我正在尝试基于免费主题重新构建,但到目前为止您需要购买该主题。抱歉 :-(
Yii 2 高级应用模板
Yii 2 高级应用模板是一个适合开发复杂Web应用的高级模板。
该模板包括三个层次:前端、后端和控制台,每个都是单独的Yii应用。
该模板旨在在团队合作环境中工作。它支持在不同环境中部署应用。
目录结构
common
config/ contains shared configurations
mail/ contains view files for e-mails
models/ contains model classes used in both backend and frontend
console
config/ contains console configurations
controllers/ contains console controllers (commands)
migrations/ contains database migrations
models/ contains console-specific model classes
runtime/ contains files generated during runtime
backend
assets/ contains application assets such as JavaScript and CSS
config/ contains backend configurations
controllers/ contains Web controller classes
models/ contains backend-specific model classes
runtime/ contains files generated during runtime
views/ contains view files for the Web application
web/ contains the entry script and Web resources
frontend
assets/ contains application assets such as JavaScript and CSS
config/ contains frontend configurations
controllers/ contains Web controller classes
models/ contains frontend-specific model classes
runtime/ contains files generated during runtime
views/ contains view files for the Web application
web/ contains the entry script and Web resources
widgets/ contains frontend widgets
vendor/ contains dependent 3rd-party packages
environments/ contains environment-based overrides
tests contains various tests for the advanced application
codeception/ contains tests developed with Codeception PHP Testing Framework
要求
此应用模板对Web服务器的最低要求是支持PHP 5.4.0。
安装
通过Composer安装
如果您没有 Composer,您可以通过遵循 getcomposer.org 上的说明进行安装。
然后您可以使用以下命令安装应用程序
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta4"
php composer.phar create-project --prefer-dist --stability=dev tez/yii2-app-advanced advanced
入门
安装应用程序后,您必须执行以下步骤以初始化安装的应用程序。您只需执行一次即可。
- 运行命令
init
以使用特定环境初始化应用程序。 - 创建一个新的数据库,并相应地调整
common/config/main-local.php
中的components['db']
配置。 - 使用控制台命令
sh migrate.sh
应用迁移。这将创建应用运行所需的所有表。 - 设置您的Web服务器的文档根目录
- 对于前端
/path/to/yii-application/frontend/web/
,使用URLhttp://frontend/
- 对于后端
/path/to/yii-application/backend/web/
,使用URLhttp://backend/
- 打开
common/config/params.php
并在mandrill
部分添加您的Mandrill详细信息。 - 购买Brain主题后,解压缩它并将文件夹HTML/Bootstrap/Liquid复制到
vendor/tez/yii2-brain-theme/assets/Brain/Liquid
- 待办事项 - 创建一个cron作业以发送电子邮件通知
- 待办事项 - 为存储文件夹创建需要放入apache配置文件中的别名信息
待办事项
- 找到一个方法,这样您就不需要硬编码URL
- 让迁移在Windows上也工作,现在
sh migrate.sh
太具体了
URLs
- 登录:
yourhost/core/default/login
用户名: webmaster@2ezweb.com.au 密码: admin - 登出:
yourhost/core/default/logout
- 重置密码:
yourhost/core/default/request-password-reset
- 用户管理:
yourhost/core/administrator/
测试
转到 vendor/tez/yii2-cms-module/tests/codeception/backend/
运行
codecept build
以初始化测试。然后运行
codecept run
以运行实际的测试。
您还可以运行
codecept run --coverage-html
以获取代码覆盖率。您可以在 vendor/tez/yii2-cms-module/tests/codeception/backend/_output/coverage/
中找到覆盖率。
待办事项
- 将所有测试运行在应用下的/test文件夹中,而不是在vendor文件夹中
- 使验收测试也能正常工作
- 提供如何安装codeception的说明