| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function register(): void |
||
| 30 | { |
||
| 31 | // Automatically apply the package configuration |
||
| 32 | $this->mergeConfigFrom(__DIR__.'/../config/sovren.php', 'sovren'); |
||
| 33 | |||
| 34 | // Register the main class to use with the facade |
||
| 35 | $this->app->singleton('laravel-sovren', static function () { |
||
| 36 | $client = new Client([ |
||
| 37 | 'base_uri' => config('sovren.sovren-base-uri'), |
||
| 38 | 'headers' => [ |
||
| 39 | 'Accept' => 'application/json', |
||
| 40 | 'Content-Type' => 'application/json', |
||
| 41 | 'Sovren-AccountId' => config('sovren.sovren-accountid'), |
||
| 42 | 'Sovren-ServiceKey' => config('sovren.sovren-servicekey'), |
||
| 43 | 'User-Agent' => 'Laravel' |
||
| 44 | ] |
||
| 45 | ]); |
||
| 46 | return new Sovren($client); |
||
| 47 | }); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |