FlashProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 33
rs 10
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 1
A register() 0 11 1
1
<?php
2
3
namespace GeekGhc\LaraFlash;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class FlashProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->loadViewsFrom(__DIR__.'/../../views','laraflash');
17
18
        $this->publishes([
19
            __DIR__.'/../../views'=>base_path('resources/views/vendor/laraFlash'),
20
        ]);
21
    }
22
23
    /**
24
     * Register the application services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $this->app->bind(
31
            'GeekGhc\LaraFlash\SessionStore',
32
            'GeekGhc\LaraFlash\LaravelSessionStore'
33
        );
34
35
        $this->app->singleton('laraflash',function(){
36
            return $this->app->make('GeekGhc\LaraFlash\FlashNotifier');
37
        });
38
    }
39
}
40