ViewExportServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 27
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
A boot() 0 6 1
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