Blackcube CMS 核心系统

安装: 727

依赖: 3

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

类型:yii2-extension

3.3.1 2024-09-20 11:08 UTC

README

pipeline status coverage report

先决条件

  • PHP 7.4+
    • 扩展 dom
    • 扩展 fileinfo
    • 扩展 intl
    • 扩展 json
    • 扩展 mbstring
  • Apache 或 NginX

预检查

将 blackcube 核心添加到项目中

composer require "blackcube/core" 

安装

注意: Blackcube 核心库 可以独立使用,但推荐使用 Blackcube 管理员

在应用程序中注入 Blackcube 核心库

// 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
    ],
    '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
        ],
    ],
// ...

更新数据库

在数据库中添加所需表

php yii.php migrate

使用基本数据初始化数据库

php yii.php bc:init

Blackcube 核心库现在已就绪,您可以使用它了