Completed
Push — master ( a7cc71...174227 )
by Sherif
03:00
created

ModuleServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace App\Modules\V1\Core\Providers;
4
5
use Caffeinated\Modules\Support\ServiceProvider;
6
7
class ModuleServiceProvider extends ServiceProvider
8
{
9
	/**
10
     * Bootstrap the module services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'catalog');
17
        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'catalog');
18
    }
19
20
    /**
21
     * Register the module services.
22
     *
23
     * @return void
24
     */
25
    public function register()
26
    {
27
        //Bind Core Facade to the IoC Container
28
        \App::bind('Core', function()
29
        {
30
            return new \App\Modules\V1\Core\Core;
31
        });
32
33
        //Bind ErrorHandler Facade to the IoC Container
34
        \App::bind('ErrorHandler', function()
35
        {
36
            return new \App\Modules\V1\Core\Utl\ErrorHandler;
37
        });
38
39
        //Bind CoreConfig Facade to the IoC Container
40
        \App::bind('CoreConfig', function()
41
        {
42
            return new \App\Modules\V1\Core\Utl\CoreConfig;
43
        });
44
45
        //Bind Logging Facade to the IoC Container
46
        \App::bind('Logging', function()
47
        {
48
            return new \App\Modules\V1\Core\Utl\Logging;
49
        });
50
        
51
        $this->app->register(RouteServiceProvider::class);
52
    }
53
}
54