2023-03-17 14:33:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2023-05-30 13:52:17 +00:00
|
|
|
use Illuminate\Support\Facades\Http;
|
2023-03-17 14:33:48 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
2023-05-30 13:52:17 +00:00
|
|
|
Http::macro('github', function (string $api_url) {
|
|
|
|
return Http::withHeaders([
|
|
|
|
'Accept' => 'application/vnd.github.v3+json'
|
|
|
|
])->baseUrl($api_url);
|
|
|
|
});
|
2023-03-17 14:33:48 +00:00
|
|
|
}
|
|
|
|
}
|