wayhood / yii2-app-template
Yii 2 应用模板
dev-master
2015-01-21 05:57 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
- yiisoft/yii2-swiftmailer: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-07 17:28:07 UTC
README
目录结构
apps
common
config/ contains shared configurations
mail/ contains view files for e-mails
models/ contains model classes used in both backend and frontend
scripts
init init project
app app creation/deletion tool
requirements php environment check.
runtimes/ contains files generated during runtime by app name
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
安装
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta4"
php composer.phar create-project --prefer-dist --stability=dev wayhood/yii2-app-template app
入门指南
- 运行
scripts/app
创建 web 或 console 的应用程序, 会在 apps 下创建 - 运行
scripts/init
初始化项目
设置你的 Web 服务器文档根目录
- 对于 appname
/path/to/yii-application/apps/"appname"/web/
并使用 URLhttp://webserver/pato/to/
运行控制台应用程序
- scripts/"entryname"
使用 vendor/bin/yii
运行 yii 系统的命令
快速还原官方的 yii2-app-advanced
scripts/app --act=Create --type=Web --name=backend
scripts/app --act=Create --type=Web --name=frontend
scripts/app --act=Create --type=Console --name=console --enter=yii