forked from meolu/walle-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add command to checkout version: ./yii walle
- Loading branch information
wushuiyong
committed
Jan 17, 2016
1 parent
86d2bf1
commit bb7f7a6
Showing
4 changed files
with
45 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
<?php | ||
// Merged web + local configuration is available in $web | ||
$params = [ | ||
'version' => 'v1.0.0', | ||
'buildTime' => '2016-01-16', | ||
]; | ||
return [ | ||
'id' => 'console', | ||
'basePath' => dirname(__DIR__), | ||
'bootstrap' => ['log'], | ||
'id' => 'console', | ||
'basePath' => dirname(__DIR__), | ||
'bootstrap' => ['log'], | ||
'controllerNamespace' => 'app\console', | ||
'extensions' => $web['extensions'], | ||
'components' => [ | ||
'db' => $web['components']['db'], | ||
'mongodb' => [ | ||
'class' => 'yii\mongodb\Connection', | ||
'dsn' => 'mongodb://localhost:27017/local', | ||
], | ||
'log' => [ | ||
'extensions' => $web['extensions'], | ||
'defaultRoute' => 'walle/index', | ||
'components' => [ | ||
'db' => $web['components']['db'], | ||
'log' => [ | ||
'targets' => [ | ||
[ | ||
'class' => 'yii\log\FileTarget', | ||
'class' => 'yii\log\FileTarget', | ||
'levels' => ['error', 'warning'], | ||
], | ||
], | ||
], | ||
'example' => [ | ||
'class' => 'console\controllers\ExampleController', | ||
], | ||
], | ||
'params' => $web['params'], | ||
'params' => array_merge($web['params'], $params), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
<?php | ||
|
||
/* ***************************************************************** | ||
* @Author: wushuiyong | ||
* @Created Time : 日 1/17 09:22:10 2016 | ||
* | ||
* @File Name: WalleController.php | ||
* @Description: walle脚手架 | ||
* *****************************************************************/ | ||
|
||
namespace app\console; | ||
|
||
use yii; | ||
use yii\console\Controller; | ||
use yii\helpers\Console; | ||
|
||
/** | ||
* run controller | ||
*/ | ||
class RunController extends Controller { | ||
class WalleController extends Controller { | ||
|
||
public $writablePaths = [ | ||
'@app/runtime', | ||
|
@@ -20,6 +24,10 @@ class RunController extends Controller { | |
'@app/yii', | ||
]; | ||
|
||
public function actionIndex() { | ||
echo sprintf("walle-web %s (built: %s)\nCopyright (c) 2015-2016 The walle-web Group.\nGet Help from [email protected]. Enjoy It.\n", | ||
Yii::$app->params['version'], Yii::$app->params['buildTime']); | ||
} | ||
/** | ||
* init walle 初始化项目 | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ git clone [email protected]:meolu/walle-web.git | |
cd walle-web | ||
vi config/web.php # 设置mysql连接 | ||
composer install # 如果缺少bower-asset的话, 先安装:composer global require "fxp/composer-asset-plugin:*" | ||
./yii run/setup # 初始化项目 | ||
./yii walle/setup # 初始化项目 | ||
配置nginx/apache的webroot指向walle-web/web,简单范例详见页面底部常见问题和解决办法。 | ||
``` | ||
|
||
|
@@ -74,22 +74,22 @@ composer install # 如果缺少bower-asset的话, 先安装:composer global | |
|
||
* 配置企业邮箱smtp | ||
```php | ||
vi config/web.php +25 | ||
vi config/local.php +20 | ||
|
||
# 配置mail smtp模块 | ||
'class' => 'Swift_SmtpTransport', | ||
'host' => 'smtp.huamanshu.com', # smtp 发件地址 | ||
'username' => '[email protected]', # smtp 发件用户名 | ||
'password' => 'password', # smtp 发件人的密码 | ||
'port' => 25, # smtp 端口 | ||
'encryption' => 'tls', # smtp 协议 | ||
'transport' => [ | ||
'host' => 'smtp.huamanshu.com', # smtp 发件地址 | ||
'username' => '[email protected]', # smtp 发件用户名 | ||
'password' => 'K84erUuxg1bHqrfD', # smtp 发件人的密码 | ||
'port' => 25, # smtp 端口 | ||
'encryption' => 'tls', # smtp 协议 | ||
], | ||
'messageConfig' => [ | ||
'charset' => 'UTF-8', | ||
'from' => ['[email protected]' => '花满树出品'], # smtp 发件用户名(须与mail.transport.username一致) | ||
], | ||
|
||
|
||
vi config/params.php | ||
|
||
'support.email' => '[email protected]', // 与config/web.php 中mail模块的username一致 | ||
``` | ||
|
||
* 配置日志路径 | ||
```php | ||
vi config/params.php | ||
|
@@ -99,7 +99,7 @@ composer install # 如果缺少bower-asset的话, 先安装:composer global | |
|
||
* 指定语言 | ||
```php | ||
vi config/web.php +73 | ||
vi config/local.php +36 | ||
|
||
'language' => 'zh', # zh => 中文, en => english | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters