Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
9 / 9 |
| Mecom\Transaction\TransactionSvcServiceProvider | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
9 / 9 |
| register | |
100.00% |
1 / 1 |
1 | |
100.00% |
9 / 9 |
|||
| <?php | |
| namespace Mecom\Transaction; | |
| 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); | |
| } | |
| ); | |
| } | |
| } |