PostOfficeServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 14
rs 10
1
<?php
2
3
namespace Sfneal\PostOffice\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class PostOfficeServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap any Tracking services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        // Publish config file
17
        $this->publishes([
18
            __DIR__.'/../../config/post-office.php' => config_path('post-office.php'),
19
        ], 'config');
20
21
        // Load Views
22
        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'post-office');
23
24
        // Publish Views
25
        $this->publishes([
26
            __DIR__.'/../../resources/views' => resource_path('views/vendor/sfneal/post-office'),
27
        ], 'views');
28
    }
29
30
    /**
31
     * Register any Tracking services.
32
     *
33
     * @return void
34
     */
35
    public function register()
36
    {
37
        // Load config file
38
        $this->mergeConfigFrom(__DIR__.'/../../config/post-office.php', 'post-office');
39
    }
40
}
41