blackcube / admin
Blackcube CMS 管理系统
3.3.1
2024-09-20 11:19 UTC
Requires
- php: >=8.0
- ext-dom: *
- ext-fileinfo: *
- ext-intl: *
- ext-json: *
- blackcube/core: 3.3.1
- hashids/hashids: ~4.1
- swaggest/json-schema: ~0.12
- vlucas/phpdotenv: ~5.4
- web-auth/webauthn-lib: ^5.0
- yiisoft/yii2: ~2.0.13
- yiisoft/yii2-imagine: ~2.3
Requires (Dev)
- codeception/codeception: ~5.0
- codeception/module-asserts: ~2.0
- codeception/module-yii2: ~1.1
- yiisoft/yii2-debug: ~2.1
- yiisoft/yii2-gii: ~2.2
This package is auto-updated.
Last update: 2024-09-20 11:22:35 UTC
README
先决条件
- PHP 7.4+
- 扩展
dom
- 扩展
fileinfo
- 扩展
intl
- 扩展
json
- 扩展
mbstring
- 扩展
- Apache 或 NginX
- Blackcube 核心版本 3;x
预航
将 blackcube admin 添加到项目中
composer require "blackcube/admin"
安装
注意:
Blackcube admin
仅在已设置Blackcube core
的情况下才能安装
将 Blackcube admin 注入应用
// main configuration file 'container' => [ 'singletons' => [ // local filesystem blackcube\core\components\Flysystem::class => [ 'class' => blackcube\core\components\FlysystemLocal::class, 'path' => getstrenv('FILESYSTEM_LOCAL_PATH'), ], // or s3 blackcube\core\components\Flysystem::class => [ 'class' => blackcube\core\components\FlysystemAwsS3::class, 'key' => getstrenv('FILESYSTEM_S3_KEY'), 'secret' => getstrenv('FILESYSTEM_S3_SECRET'), 'bucket' => getstrenv('FILESYSTEM_S3_BUCKET'), 'region' => getstrenv('FILESYSTEM_S3_REGION'), 'version' => 'latest', 'endpoint' => getstrenv('FILESYSTEM_S3_ENDPOINT'), 'pathStyleEndpoint' => getboolenv('FILESYSTEM_S3_PATH_STYLE'), ], ] ], // ... 'bootstrap' => [ // ... boostrapped modules 'blackcube', // blackcube core 'bo', // blackcube admin ], // ... 'modules' => [ // ... other modules 'blackcube' => [ 'class' => blackcube\core\Module::class, 'plugins' => [ // additional plugins ], 'cmsEnabledmodules' => [ // additional modules ], 'allowedParameterDomains' => ['], // override components if needed 'components' => [ 'db' => ... 'cache' => ... 'fs' => ... ], /// end override ], 'bo' => [ 'class' => blackcube\admin\Module::class, 'adminTemplatesAlias' => '@app/admin', 'additionalAssets' => [ // additional modules ], 'modules' => [ // additional modules ], // override components if needed 'components' => [ 'db' => ... 'cache' => ... 'fs' => ... ], /// end override ], ], // ...
更新数据库
在数据库中添加所需表
php yii.php migrate
初始化所有 RBAC 角色和权限
php yii.php bc:rbac
每次通过模块或插件添加新的 Rbac(角色/权限)时,都必须运行该命令
创建初始管理员
php yii.php bc:admin/create
Blackcube admin 现已准备就绪,您可以通过
https://host.domain/bo
访问它