ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 1
Metric Value
cc 1
eloc 9
c 5
b 0
f 1
nc 1
nop 0
dl 0
loc 11
rs 9.9666
1
<?php
2
3
namespace Frowhy\Modular;
4
5
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
6
7
class ServiceProvider extends LaravelServiceProvider
8
{
9
    public function boot()
10
    {
11
        $this->publishes([
12
            dirname(__DIR__).'/config/repository.php' => config_path('repository.php'),
13
        ], 'modular-config');
14
        $this->publishes([
15
            dirname(__DIR__).'/config/modules.php' => config_path('modules.php'),
16
        ], 'modular-config');
17
        $this->publishes([
18
            dirname(__DIR__).'/stubs/example' => base_path('modules/Example'),
19
        ], 'modular-example');
20
    }
21
22
    public function register()
23
    {
24
        $this->mergeConfigFrom(
25
            dirname(__DIR__).'/config/repository.php', 'repository'
26
        );
27
        $this->mergeConfigFrom(
28
            dirname(__DIR__).'/config/modules.php', 'modules'
29
        );
30
    }
31
}
32