feat: phase 0 foundation — InsForge REST client, config, env wiring, dev account
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Services\InsForge\InsForgeClient;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -11,7 +13,15 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
$this->app->singleton(InsForgeClient::class, function (Application $app) {
|
||||
$config = $app->make('config')->get('insforge');
|
||||
|
||||
return new InsForgeClient(
|
||||
$config['base_url'],
|
||||
$config['api_key'],
|
||||
$config['timeout'],
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user