PHP code example of slivka-b / flysystem-selectel

1. Go to this page and download the library: Download slivka-b/flysystem-selectel 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/ */

    

slivka-b / flysystem-selectel example snippets


/*
 * Package Service Providers...
 */
ArgentCrusade\Flysystem\Selectel\SelectelServiceProvider::class,

'selectel' => [
    'driver' => 'selectel',
    'username' => 'selectel-username',
    'password' => 'selectel-password',
    'container' => 'selectel-container',
    'container_url' => 'https://static.example.org',
]

use Illuminate\Support\Facades\Storage;

Storage::disk('selectel')->put('file.txt', 'Hello world');

$fs = new Filesystem($adapter);

$fs->createDir('images'); // The 'images' directory can be deleted and will be listed as 'dir' in the results of `$fs->listContents()`.

$fs->write('documents/hello.txt'); // The 'documents' directory can not be deleted and won't be listed in the results of `$fs->listContents()`.