Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
8 / 8
FileGeneratorProvider
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
8 / 8
 boot
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 register
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
6 / 6
1<?php
2namespace Qmp\Laravel\FileGenerator\Providers;
3
4use Illuminate\Support\ServiceProvider;
5use Qmp\Laravel\FileGenerator\Config;
6use Qmp\Laravel\MicroService\DbConnection\DbConnection;
7use Qmp\Laravel\MicroService\QueueConnection\QueueConnection;
8
9class 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}