Php Can';不要在laravel中使用几个Oauth
问题是我不能同时使用两个SocialProvider 在文件EventServiceProvider中,我有以下内容Php Can';不要在laravel中使用几个Oauth,php,laravel-5,oauth-2.0,Php,Laravel 5,Oauth 2.0,问题是我不能同时使用两个SocialProvider 在文件EventServiceProvider中,我有以下内容 protected $listen = [ 'App\Events\SomeEvent' => [ 'App\Listeners\EventListener', ], \SocialiteProviders\Manager\SocialiteWasCalled::class => [ // add your li
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
],
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// add your listeners (aka providers) here
'SocialiteProviders\VKontakte\VKontakteExtendSocialite@handle',
],
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
\JhaoDa\SocialiteProviders\Odnoklassniki\OdnoklassnikiExtendSocialite::class
],
];
因此,如果Odnoklassniki提供程序工作,就不可能使用Vkontakte提供程序。它提供了以下内容:
Manager.php第90行中的InvalidArgumentException:
不支持驱动程序[vkontakte]
如果我评论Odnoklassniki,Ir也不会起作用
如何使其同时工作。当您使用数组的相同键放置另一项时,它将覆盖以前的值。只需将它们添加到一个键:
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
],
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// add your listeners (aka providers) here
'SocialiteProviders\VKontakte\VKontakteExtendSocialite@handle',
\JhaoDa\SocialiteProviders\Odnoklassniki\OdnoklassnikiExtendSocialite::class
],
];