Skip to content

Instantly share code, notes, and snippets.

@WyattCast44
Created March 23, 2019 22:05
Show Gist options
  • Save WyattCast44/03b5044f8eb8c03fc730762be35116f6 to your computer and use it in GitHub Desktop.
Save WyattCast44/03b5044f8eb8c03fc730762be35116f6 to your computer and use it in GitHub Desktop.
<?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