Passed
Push — master ( 0dde30...57f1fc )
by Jim
03:20
created

DbRouterServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
c 2
b 0
f 0
1
<?php
2
3
namespace Oddvalue\DbRouter;
4
5
use Illuminate\Routing\Router;
6
use Illuminate\Support\ServiceProvider;
7
8
class DbRouterServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = true;
16
17
    /**
18
     * Bootstrap the application services.
19
     */
20 36
    public function boot()
21
    {
22
        // publish the migrations and seeds
23 36
        $this->publishes([__DIR__.'/../database/migrations/' => database_path('migrations')], 'migrations');
24
25 36
        $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
26 36
    }
27
28
    /**
29
     * Register the application services.
30
     */
31 36
    public function register()
32
    {
33 36
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'dbrouter');
34 36
    }
35
}
36