You probably need to bind the implementation to the interface in bootstrap/app.php
$app->singleton(
Illuminate\Contracts\Filesystem\Factory::class,
function ($app) {
return new Illuminate\Filesystem\FilesystemManager($app);
}
);
I've just upgraded to Lumen 5.3 from Lumen 5.2. I'm trying to use the inbuilt store method as below:
$request->file('file')->store('avatars');
But, I'm getting the following error:
Target [Illuminate\Contracts\Filesystem\Factory] is not instantiable.
I've added the "league/flysystem": "^1.0" and config file. Still the same problem.
You probably need to bind the implementation to the interface in bootstrap/app.php
$app->singleton(
Illuminate\Contracts\Filesystem\Factory::class,
function ($app) {
return new Illuminate\Filesystem\FilesystemManager($app);
}
);
Please or to participate in this conversation.