ActiveRouteServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 21
rs 9.584
c 0
b 0
f 0
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