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');

/* Start to develop here. Best regards https://php-download.com/ */

    

blackcube / admin example snippets

 
// 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

php yii.php bc:rbac

php yii.php bc:admin/create