PHP code example of blackcube / admin
1. Go to this page and download the library: Download blackcube/admin library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once ('vendor/autoload.php' );
blackcube / admin example snippets
'container' => [
'singletons' => [
blackcube\core\components\Flysystem::class => [
'class' => blackcube\core\components\FlysystemLocal::class,
'path' => getstrenv('FILESYSTEM_LOCAL_PATH' ),
],
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' => [
'blackcube' ,
'bo' ,
],
'modules' => [
'blackcube' => [
'class' => blackcube\core\Module::class,
'plugins' => [
],
'cmsEnabledmodules' => [
],
'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
php yii.php bc:rbac
php yii.php bc:admin/create