| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function boot() |
||
| 23 | { |
||
| 24 | $this->app->when(SMSCChannel::class) |
||
| 25 | ->needs(SMSCClientInterface::class) |
||
| 26 | ->give(function () { |
||
| 27 | $config = config('services.SMSC', [ |
||
| 28 | 'http' => [ |
||
| 29 | 'endpoint' => 'https://www.smsc.com.ar/api/0.3/', |
||
| 30 | ], |
||
| 31 | 'alias' => '', |
||
| 32 | 'apikey' => '', |
||
| 33 | 'timeout' => '', |
||
| 34 | ]); |
||
| 35 | |||
| 36 | $endpoint = $config['http']['endpoint']; |
||
| 37 | $alias = $config['alias']; |
||
| 38 | $apikey = $config['apikey']; |
||
| 39 | $timeout = $config['timeout']; |
||
| 40 | |||
| 41 | $guzzleHttpClient = new Client(['timeout' => $timeout]); |
||
| 42 | $SMSCClient = new SMSCClient($guzzleHttpClient, $endpoint, $alias, $apikey); |
||
| 43 | |||
| 44 | return $SMSCClient; |
||
| 45 | }); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |