exoodev / yii2-system
关于此包的最新版本(1.0.3)没有可用的许可证信息。
Yii2框架的系统扩展
1.0.3
2019-05-20 09:56 UTC
Requires
- bizley/migration: ^3.1
- codemix/yii2-localeurls: 1.4.6
- creocoder/yii2-flysystem: ^0.9.0
- creocoder/yii2-nested-sets: 0.9.*
- exoodev/yii2-exookit: *
- exoodev/yii2-settings: *
- exoodev/yii2-uikit: *
- samdark/yii2-webshell: ~2.0
- yii2tech/ar-dynattribute: *
- yii2tech/ar-linkmany: *
- yii2tech/ar-position: *
- yii2tech/ar-variation: *
- yii2tech/file-storage: ^1.1
- yii2tech/sitemap: *
- yiisoft/yii2: ~2.0.14
- yiisoft/yii2-authclient: ~2.1.0
- yiisoft/yii2-imagine: ^2.0
- yiisoft/yii2-swiftmailer: ~2.0.0 || ~2.1.0
This package is auto-updated.
Last update: 2024-09-25 22:28:41 UTC
README
========================
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一:
php composer.phar require --prefer-dist exoo/yii2-system
或添加
"exoo/yii2-system": "*"
到您的 composer.json 文件的要求部分。
使用方法
- 示例后端配置
return [
'modules' => [
'system' => [
'class' => 'exoo\system\Module',
'isBackend' => true,
],
],
'components' => [
'user' => [
'identityClass' => 'exoo\system\models\User',
'enableAutoLogin' => true,
'loginUrl' => ['/system/site/login'],
'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true],
],
],
];
- 示例前端配置
return [
'modules' => [
'system' => [
'class' => 'exoo\system\Module',
]
],
];
- 示例控制台配置
return [
'modules' => [
'system' => [
'class' => 'exoo\system\Module',
'controllerNamespace' => 'exoo\system\controllers\console',
]
],
];
- 运行迁移
yii migrate --migrationPath=@yii/log/migrations/
yii migrate --migrationPath=@yii/rbac/migrations
yii migrate --migrationPath=@exoo/system/migrations
初始化rbac
yii system/rbac/init
超级管理员角色分配
yii system/user/assign-role admin 1