Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

tighten/novapackages

336 stars
2 code files
View tighten/novapackages on GitHub

app/Providers/GitHubServiceProvider.php

Open in GitHub
use App\Http\Remotes\GitHub;
use Github\Client as GitHubClient;
use Illuminate\Support\ServiceProvider;
 
class GitHubServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->bind(GitHubClient::class, function ($app) {
$client = new GitHubClient(null, 'squirrel-girl-preview');
$client->authenticate(config('services.github.client_id'), config('services.github.client_secret'), GitHubClient::AUTH_HTTP_PASSWORD);
 
return $client;
});
 
$this->app->singleton(GitHub::class, function () {
return new GitHub(app(GitHubClient::class));
});
}
}

config/app.php

Open in GitHub
return [
//
'providers' => [
//
App\Providers\GitHubServiceProvider::class,
//
],
//
];

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.