LaravelApiManagerServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 15
rs 9.4285
cc 1
eloc 11
nc 1
nop 0
1
<?php
2
3
/**
4
 * @Author: bantenprov
5
 * @Date:   2017-11-28 00:02:15
6
 * @Last Modified by:   bantenprov
7
 * @Last Modified time: 2017-11-28 09:45:46
8
 */
9
10
namespace Bantenprov\LaravelApiManager;
11
12
use Illuminate\Support\ServiceProvider;
13
14
class LaravelApiManagerServiceProvider extends ServiceProvider
15
{
16
    /**
17
     * Bootstrap the application services.
18
     *
19
     * @return void
20
     */
21
    public function boot()
22
    {
23
        include __DIR__.'/LaravelApiManager.php';
24
        $this->publishes([
25
        __DIR__ . '/config' => config_path('/'),
26
        __DIR__ . '/views' => base_path('resources/views/api_manager'),
27
        __DIR__ . '/host_keys' => base_path('resources/views/host_keys'),
28
        __DIR__ . '/controller' => base_path('app/Http/Controllers'),
29
        __DIR__ . '/middleware' => base_path('app/Http/Middleware'),
30
        __DIR__ . '/models' => base_path('app'),
31
        __DIR__ . '/migrations' => base_path('database/migrations'),
32
33
        ]);
34
        $this->commands('Bantenprov\LaravelApiManager\Commands\RouteCommands');
35
    }
36
37
    /**
38
     * Register the application services.
39
     *
40
     * @return void
41
     */
42
    public function register()
43
    {
44
       $this->mergeConfigFrom(
45
        __DIR__ . '/config/laravel-api-manager.php', 'laravel-api-manager'
46
        );
47
    }
48
}
49