Search code examples
laravellumenlaravel-socialitelumen-5.2

Target [Laravel\Socialite\Contracts\Factory] is not instantiable


I am using laravel lumen 5.2.

Target [Laravel\Socialite\Contracts\Factory] is not instantiable.

I came across this error when trying to get Laravel to login with Twitter using the Socialite package.

Work already done:

A) In config\app.php 1. Laravel\Socialite\SocialiteServiceProvider::class 2. 'Socialite' => Laravel\Socialite\Facades\Socialite::class

I followed this : http://goodheads.io/2015/08/24/using-twitter-authentication-for-login-in-laravel-5/


Solution

  • What helped me is writing

    use Socialite;
    

    in the controller (just the alias, not the full path). And then running

    php artisan config:clear
    

    in the terminal.