coolify/app/Providers/AppServiceProvider.php

29 lines
582 B
PHP
Raw Normal View History

2023-03-17 15:33:48 +01:00
<?php
namespace App\Providers;
2023-05-30 15:52:17 +02:00
use Illuminate\Support\Facades\Http;
2023-03-17 15:33:48 +01: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 15:52:17 +02:00
Http::macro('github', function (string $api_url) {
return Http::withHeaders([
'Accept' => 'application/vnd.github.v3+json'
])->baseUrl($api_url);
});
2023-03-17 15:33:48 +01:00
}
}