Created
March 23, 2019 22:05
-
-
Save WyattCast44/03b5044f8eb8c03fc730762be35116f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\OAuth\Provider; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
$this->extendSocialite(); | |
// | |
} | |
private function extendSocialite() | |
{ | |
$socialite = $this->app->make(\Laravel\Socialite\Contracts\Factory::class); | |
$socialite->extend('provider', function ($app) use ($socialite) { | |
$config = $app['config']['services.provider']; | |
return $socialite->buildProvider(Provider::class, $config); | |
} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment