ViewExportServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Sfneal\ViewExport\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Maatwebsite\Excel\ExcelServiceProvider;
7
8
class ViewExportServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap any ViewExport services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        // Publish config file
18
        $this->publishes([
19
            __DIR__.'/../../config/view-export.php' => config_path('view-export.php'),
20
        ], 'config');
21
    }
22
23
    /**
24
     * Register any ViewExport services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        // Load config file
31
        $this->mergeConfigFrom(__DIR__.'/../../config/view-export.php', 'view-export');
32
33
        // Register Excel service provider
34
        $this->app->register(ExcelServiceProvider::class);
35
    }
36
}
37