lumen.ERROR: InvalidArgumentException: Driver [] is not supported. in /var/www/html/vendor/illuminate/filesystem/FilesystemManager.php:124
boopstrapapp.php
$app->singleton(
Illuminate\Contracts\Filesystem\Factory::class,
function ($app) {
return new Illuminate\Filesystem\FilesystemManager($app);
}
);
in customController.php
use Illuminate\Support\Facades\Storage;
class MessageController extends Controller
{
Storage::disk('local')->put('file.txt', 'Contents');
}
Hello @alexisaraya it is missing feature rather than a bug. In your case you forgot just add dependency for filesystem local driver. Running following command should be enough to solve your problem: composer require league/flysystem. In case there will be some more issues you can follow my
short "how to"guide: https://gist.github.com/deividaspetraitis/4cca4fa6a61cc9a75e12f640041e53f5
Hope it helps!
I had this same issue, It was missing $app->configure('filesystems'); in boopstrapapp.php
This is still an ongoing issue and it might be related to this line.
$this->app->singleton('filesystem.disk', function () {
return $this->app['filesystem']->disk($this->getDefaultDriver());
});
$this->app->singleton('filesystem.cloud', function () {
return $this->app['filesystem']->disk($this->getCloudDriver());
});`
I noticed that get default driver is never called.
I figured out the offending line. Either extend a new facade Illuminate\Support\Facades; so the facade accessor is filesystem.disk or extend a new service provider from the default filesystem service provider and change how it works so it is not looking for filesytem.cloud or filesystem.disk alone.
Tranks for your comments and help
Most helpful comment
I had this same issue, It was missing
$app->configure('filesystems');in boopstrapapp.php