Skip to main content

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

Read more here

spatie/spatie.be

493 stars
2 code files
View spatie/spatie.be on GitHub

app/Services/Vimeo/VimeoServiceProvider.php

Open in GitHub
use GuzzleHttp\Client;
use Illuminate\Support\ServiceProvider;
 
class VimeoServiceProvider extends ServiceProvider
{
public function register(): void
{
app()->singleton(Vimeo::class, function () {
return new Vimeo(new Client([
'headers' => [
'Authorization' => 'Bearer '.config('services.vimeo.access'),
],
]));
});
}
}

app/Services/GitHub/GitHubServiceProvider.php

Open in GitHub
use Github\Client;
use Illuminate\Support\ServiceProvider;
 
class GitHubServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->singleton(GitHubApi::class, function () {
$client = new Client();
 
$client->authenticate(config('services.github.token'), null, Client::AUTH_ACCESS_TOKEN);
 
return new GitHubApi($client);
});
}
}

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.