LaravelSearchzyServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 56
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2

2 Methods

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