Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
14 | public function boot() |
||
15 | { |
||
16 | $this->app->afterResolving(ChannelManager::class, function (ChannelManager $channels) { |
||
17 | $channels->extend('sipgate', function ($app) { |
||
18 | return $app[SipgateChannel::class]; |
||
19 | }); |
||
20 | }); |
||
21 | |||
22 | $this->app->bind(SipgateClient::class, function () { |
||
23 | return new SipgateClient( |
||
24 | new Client([ |
||
25 | 'base_uri' => 'https://api.sipgate.com/v2/', |
||
26 | 'auth' => [ |
||
27 | $this->app['config']['services.sipgate.username'], |
||
28 | $this->app['config']['services.sipgate.password'], |
||
29 | ], |
||
30 | 'headers' => [ |
||
31 | 'Accept' => 'application/json', |
||
32 | 'Content-Type' => 'application/json', |
||
33 | ], |
||
34 | ]) |
||
35 | ); |
||
36 | }); |
||
37 | } |
||
38 | |||
47 |