Conditions | 1 |
Paths | 1 |
Total Lines | 27 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function boot() |
||
11 | { |
||
12 | |||
13 | $this->publishes([ |
||
14 | __DIR__ . '/../hpconfig.php' => config_path('hpconfig.php'), |
||
15 | ]); |
||
16 | |||
17 | $this->mergeConfigFrom( |
||
18 | __DIR__ . '/../hpconfig.php', |
||
19 | 'hpconfig' |
||
20 | ); |
||
21 | |||
22 | $this->app->singleton( |
||
23 | HubPlannerClient::class, |
||
24 | function () { |
||
25 | $client = new \GuzzleHttp\Client([ |
||
26 | 'base_uri' => 'https://api.hubplanner.com/', |
||
27 | 'headers' => [ |
||
28 | 'Authorization' => config('hpconfig.key'), |
||
29 | 'Accept' => 'application/json', |
||
30 | 'Content-Type' => 'application/json' |
||
31 | ] |
||
32 | ]); |
||
33 | return new HubPlannerClient($client); |
||
34 | } |
||
35 | ); |
||
36 | } |
||
37 | } |
||
38 |