zacksleo / yii2-wechat
Yii2 wechat module
Installs: 1 097
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 0
Open Issues: 1
Language:CSS
Type:yii2-extension
Requires
- jianyan74/yii2-easy-wechat: ^1.0
- kartik-v/yii2-tree-manager: ^1.0
- npm-asset/font-awesome: ^4.7
- overtrue/wechat: ^4.0
- pheme/yii2-settings: ^0.6
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
Requires (Dev)
- phpunit/phpunit: ~4.4
README
准备工作
首先配置 yii2-easy-wechat
配置模块依赖
注意 layout和layoutPath写实际使用的布局文件, 文件内容参考 src/layouts
配置 component
'components' => [
'settings' => [
'class' => 'pheme\settings\components\Settings',
],
]
配置 modules
'modules' => [
'settings' => [
'class' => 'pheme\settings\Module',
],
'treemanager' => [
'class' => 'kartik\tree\Module',
],
'wechat' => [
'class' => 'zacksleo\yii2\wechat\backend\Module',
],
]
安装
composer require zacksleo\yii2-wechat --prefer-dist
数据库迁移
配置数据库迁移
对于高级模板(yii2-app-advanced), 配置 console/config/main.php
文件:
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationPath' => [
'@console/migrations/',
'@pheme/settings/migrations',
'@zacksleo/yii2/wechat/migrations'
],
],
],
对于基础模板 (yii2-app-basic), 配置 config/console.php
文件:
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationPath' => [
'@app/migrations/',
'@pheme/settings/migrations',
'@zacksleo/yii2/wechat/migrations'
],
],
],
执行迁移
yii migrate/up