PHP code example of atlexlib / yii2-atlexcloud

1. Go to this page and download the library: Download atlexlib/yii2-atlexcloud 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/ */

    

atlexlib / yii2-atlexcloud example snippets


$config['modules']['atlexcloud'] = [
    'class' => 'app\modules\atlex\atlexcloud',
];

return $config;




return [
    'adminEmail' => '[email protected]',



    'atlexcloud' => [

        'project' => 'your-cloud-project',
        'local_folder' => 'local_storage', // @runtime / local_storage 

        'openstack' => [
            'url' => 'https://your-url',
            'user' => 'your-user',
            'password' => 'your-password',
        ],

        's3' => [
            'url' => 'https://your-url',
            'user' => 'your-user',
            'password' => 'your-password',
        ],

        'ftp' => [
            'url' => 'your-url',
            'user' => 'your-user',
            'password' => 'your-password',
        ],

        'default_adapter' => 's3'
    ]

];



<b>How to use AtlexCloudWidget in view</b>

<?= app\modules\atlex\components\AtlexCloudWidget::widget(); 

php composer.phar