Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
8 / 8 |
| FileGeneratorProvider | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
8 / 8 |
| boot | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| register | |
100.00% |
1 / 1 |
1 | |
100.00% |
6 / 6 |
|||
| 1 | <?php |
| 2 | namespace Qmp\Laravel\FileGenerator\Providers; |
| 3 | |
| 4 | use Illuminate\Support\ServiceProvider; |
| 5 | use Qmp\Laravel\FileGenerator\Config; |
| 6 | use Qmp\Laravel\MicroService\DbConnection\DbConnection; |
| 7 | use Qmp\Laravel\MicroService\QueueConnection\QueueConnection; |
| 8 | |
| 9 | class FileGeneratorProvider extends ServiceProvider |
| 10 | { |
| 11 | /** |
| 12 | * Boot the service provider. |
| 13 | * |
| 14 | * @return void |
| 15 | */ |
| 16 | public function boot() |
| 17 | { |
| 18 | $this->loadMigrationsFrom(__DIR__ . '/../database/migrations/'); |
| 19 | } |
| 20 | |
| 21 | public function register() |
| 22 | { |
| 23 | DbConnection::mergeFromFile(realpath(__DIR__.'/../../config/connection.php')); |
| 24 | QueueConnection::mergeFromFile(realpath(__DIR__.'/../../config/queue.php')); |
| 25 | |
| 26 | $this->app->bind(Config::class, function($app, $config) { |
| 27 | return new Config($config); |
| 28 | }); |
| 29 | } |
| 30 | } |