Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
44.44% |
4 / 9 |
| TransactionSvcServiceProvider | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
1.17 | |
44.44% |
4 / 9 |
| register | |
0.00% |
0 / 1 |
1.17 | |
44.44% |
4 / 9 |
|||
| <?php | |
| namespace Geekhives\TransactionSvc; | |
| use Illuminate\Support\ServiceProvider; | |
| class TransactionSvcServiceProvider extends ServiceProvider | |
| { | |
| public function register() | |
| { | |
| $this->app->bind( | |
| TransactionSvc::class, | |
| function ($app) { | |
| $config = $app['config']['transaction_svc']; | |
| $token = $app['request']->bearerToken(); | |
| $client = new \GuzzleHttp\Client( | |
| [ | |
| 'base_uri' => $config['base_uri'] | |
| ] | |
| ); | |
| return new Client($client, $token); | |
| } | |
| ); | |
| } | |
| } |