PHP code example of scratcher28 / flysystem-mailru-cloud
1. Go to this page and download the library: Download scratcher28/flysystem-mailru-cloud 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/ */
scratcher28 / flysystem-mailru-cloud example snippets
php
namespace App\Providers;
use Freecod\FlysystemMailRuCloud\MailRuCloudAdapter;
use Friday14\Mailru\Cloud;
use League\Flysystem\Filesystem;
use Illuminate\Support\ServiceProvider;
class MailRuCloudServiceProvider extends ServiceProvider
{
public function boot()
{
\Storage::extend('mailru', function ($app, $config) {
$client = new Cloud(
$config['login'],
$config['password'],
$config['domain']
);
return new Filesystem(new MailRuCloudAdapter($client));
});
}
}