JillzTom's avatar

Target [Illuminate\Contracts\Filesystem\Factory] is not instantiable.

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.

0 likes
3 replies
tykus's avatar
tykus
Best Answer
Level 104

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);
    }
);
1 like
maiskiykot's avatar

I trying install template and have here:

(1/1) BindingResolutionException Target [Illuminate\Contracts\Http\Kernel] is not instantiable. in Container.php line 978

at Container->notInstantiable('Illuminate\Contracts\Http\Kernel') in Container.php line 812

at Container->build('Illuminate\Contracts\Http\Kernel') in Container.php line 681

at Container->resolve('Illuminate\Contracts\Http\Kernel', array()) in Container.php line 629

at Container->make('Illuminate\Contracts\Http\Kernel', array()) in Application.php line 274

at Application->make('Illuminate\Contracts\Http\Kernel') in index.php line 52

What is it?

Please or to participate in this conversation.