ActiveRouteServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 21 2
A register() 0 10 1
1
<?php
2
3
namespace Zengine\ActiveRoute;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ActiveRouteServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        /*
15
         * Optional methods to load your package assets
16
         */
17
        // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'active-route');
18
        // $this->loadViewsFrom(__DIR__.'/../resources/views', 'active-route');
19
        // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
20
        // $this->loadRoutesFrom(__DIR__.'/routes.php');
21
22
        if ($this->app->runningInConsole()) {
23
            //$this->publishes([
24
            //    __DIR__.'/../config/config.php' => config_path('active-route.php'),
25
            //], 'config');
26
27
            // Publishing the views.
28
            /*$this->publishes([
29
                __DIR__.'/../resources/views' => resource_path('views/vendor/active-route'),
30
            ], 'views');*/
31
        }
32
    }
33
34
    /**
35
     * Register the application services.
36
     */
37
    public function register()
38
    {
39
        // Automatically apply the package configuration
40
        //$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'active-route');
41
42
        // Register the main class to use with the facade
43
        $this->app->singleton('active-route', function () {
44
            return app(ActiveRoute::class);
45
        });
46
    }
47
}
48