mediabet-concepture / yii2-blog-module
正在开发中的包
v1.0.0
2019-12-15 15:36 UTC
Requires
- php: >=5.6.0
- concepture/yii2-handbook-module: dev-master
- concepture/yii2-logic-core: dev-master
- concepture/yii2-user-module: dev-master
- mihaildev/yii2-ckeditor: *
- yiisoft/yii2: 2.0.29
- yiisoft/yii2-jui: ~2.0.0
This package is auto-updated.
Last update: 2024-09-22 12:58:11 UTC
README
连接
"require": {
"concepture/yii2-blog" : "*"
},
php yii migrate/up --migrationPath=@concepture/yii2blog/console/migrations
连接后台模块
'modules' => [
'article' => [
'class' => 'concepture\yii2blog\Module'
],
],
如果要重写控制器,请添加到模块配置中
'modules' => [
'article' => [
'class' => 'concepture\yii2blog\Module',
'controllerMap' => [
'post' => 'backend\controllers\PostController'
],
],
],
如果要重写表示的文件夹,请添加到模块配置中
'modules' => [
'article' => [
'class' => 'concepture\yii2blog\Module',
'viewPath' => '@backend/views'
],
],
要重写任何类,可以使用 config.php 中的依赖注入。例如,将 StaticBlock 模型替换为您的模型。
<?php
return [
'container' => [
'definitions' => [
'concepture\yii2blog\models\StaticBlock' => ['class' => 'backend\models\StaticBlock'],
],
],
]