mediabet-concepture / yii2-account-module
开发中的包
v1.0.0
2020-01-06 14:39 UTC
Requires
- php: >=5.6.0
- yiisoft/yii2: 2.0.29
This package is auto-updated.
Last update: 2024-09-28 10:35:48 UTC
README
连接
"require": {
"concepture/yii2-blog" : "*"
},
php yii migrate/up --migrationPath=@concepture/yii2account/console/migrations --interactive=0
连接后台模块
'modules' => [
'article' => [
'class' => 'concepture\yii2account\Module'
],
],
如果要重写控制器,请在模块配置中添加
'modules' => [
'article' => [
'class' => 'concepture\yii2account\Module',
'controllerMap' => [
'post' => 'backend\controllers\PostController'
],
],
],
如果要重写表示层文件夹,请在模块配置中添加
'modules' => [
'article' => [
'class' => 'concepture\yii2account\Module',
'viewPath' => '@backend/views'
],
],
如果要重写任何类,可以使用 config.php 中的依赖注入功能。例如,可以将 StaticBlock 模型替换为自己的模型
<?php
return [
'container' => [
'definitions' => [
'concepture\yii2account\models\StaticBlock' => ['class' => 'backend\models\StaticBlock'],
],
],
]