Lae/app/Providers/AppServiceProvider.php

37 lines
636 B
PHP
Raw Normal View History

2022-08-12 07:56:56 +00:00
<?php
namespace App\Providers;
2022-08-19 09:51:52 +00:00
use Illuminate\Support\Facades\Http;
2022-08-12 07:56:56 +00:00
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
2022-08-19 09:51:52 +00:00
Http::macro('remote', function ($api_token, $url) {
return Http::withHeaders([
'X-Remote-Api-Token' => $api_token,
])->baseUrl($url);
});
2022-08-12 07:56:56 +00:00
}
}