目标[Laravel \ Socialite \ Contracts \ Factory]无法实例化 [英] Target [Laravel\Socialite\Contracts\Factory] is not instantiable

查看:224
本文介绍了目标[Laravel \ Socialite \ Contracts \ Factory]无法实例化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用laravel流明5.2.

I am using laravel lumen 5.2.

目标[Laravel \ Socialite \ Contracts \ Factory]无法实例化.

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

当尝试使Laravel使用Socialite软件包登录Twitter时,我遇到了此错误.

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

工作已经完成:

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

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

我遵循了这个: http://goodheads.io/2015/08/24/using-twitter-authentication-for-login-in-laravel-5/

推荐答案

我在写什么东西

use Socialite;

控制器中的

(只是别名,而不是完整路径).然后运行

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

php artisan config:clear

在终端中.

这篇关于目标[Laravel \ Socialite \ Contracts \ Factory]无法实例化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆