Flysystem Adapter for the cloud

v0.0.4 2020-08-19 09:26 UTC

This package is not auto-updated.

Last update: 2021-02-18 11:54:37 UTC


This package contains a Flysystem adapter for Cloud. Under the hood, the Friday14/mailru-cloud-php is used.


You can install the package via composer:

composer require freecod/flysystem-mailru-cloud


This package used unofficial API client for - Friday14/mailru-cloud-php

To initialize the client, enter your login (without @domain), domain (,, etc) and password to work with the cloud.

use Friday14\Mailru\Cloud;
use Freecod\FlysystemMailRuCloud\MailRuCloudAdapter;

$client = new Cloud('login', 'password', '');

$adapter = new MailRuCloudAdapter($client);

$filesystem = new Filesystem($adapter);

Usage in Laravel

To used this package as driver for Laravel Storage drive, you must make Service Provider for extend storage drivers


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(
            return new Filesystem(new MailRuCloudAdapter($client));

Now add this Service Provider to config/app.php in section "providers":


Final step - add to config/filesystems.php in section "disks"

    'mailru' => [
        'driver' => 'mailru',
        'login' => env('MAIL_RU_CLOUD_LOGIN'),
        'domain' => env('MAIL_RU_CLOUD_DOMAIN'),
        'password' => env('MAIL_RU_CLOUD_PASSWORD'),


    $data = \Storage::disk('mailru')->files();


The MIT License (MIT). Please see License File for more information.