regulationsServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 21 1
A register() 0 7 1
1
<?php
2
3
namespace jlourenco\regulations;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class regulationsServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Perform post-registration booting of services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        // Publish our routes
17
		require __DIR__ . '/routes.php';
18
19
        // Publish our views
20
        $this->loadViewsFrom(base_path("resources/views"), 'regulations');
21
        $this->publishes([
22
            __DIR__ .  '/views' => base_path("resources/views")
23
        ]);
24
25
        // Publish our migrations
26
        $this->publishes([
27
            __DIR__ .  '/migrations' => base_path("database/migrations")
28
        ], 'migrations');
29
30
        // Publish a config file
31
        $this->publishes([
32
            __DIR__ . '/config' => base_path('/config')
33
        ], 'config');
34
    }
35
36
    /**
37
     * Register any package services.
38
     *
39
     * @return void
40
     */
41
    public function register()
42
    {
43
        // Bind the
44
        $this->app->bind('regulations', function(){
45
            return new regulations;
46
        });
47
    }
48
}