DKBaseServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 47
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 14 2
A register() 0 4 1
1
<?php
2
3
namespace Denknows\DKBase;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class DKBaseServiceProvider
9
 *
10
 * @package Denknows\DKBaseRepository
11
 */
12
class DKBaseServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * Bootstrap the application services.
16
     */
17
    public function boot()
18
    {
19
        /*
20
         * Optional methods to load your package assets
21
         */
22
        // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'dkbase');
23
        // $this->loadViewsFrom(__DIR__.'/../resources/views', 'dkbase');
24
        // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
25
        // $this->loadRoutesFrom(__DIR__.'/routes.php');
26
27
        if ($this->app->runningInConsole()) {
28
            $this->publishes([
29
                __DIR__.'/../config/config.php' => config_path('dkbase.php'),
30
            ], 'config');
31
32
            // Publishing the views.
33
            /*$this->publishes([
34
                __DIR__.'/../resources/views' => resource_path('views/vendor/dkbase'),
35
            ], 'views');*/
36
37
            // Publishing assets.
38
            /*$this->publishes([
39
                __DIR__.'/../resources/assets' => public_path('vendor/dkbase'),
40
            ], 'assets');*/
41
42
            // Publishing the translation files.
43
            /*$this->publishes([
44
                __DIR__.'/../resources/lang' => resource_path('lang/vendor/dkbase'),
45
            ], 'lang');*/
46
47
            // Registering package commands.
48
            // $this->commands([]);
49
        }
50
    }
51
52
    /**
53
     * Register the application services.
54
     */
55
    public function register()
56
    {
57
        // Automatically apply the package configuration
58
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'dkbase');
59
    }
60
}
61