ClamavFileUploadServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 14
rs 9.9
1
<?php
2
3
namespace Ikechukwukalu\Clamavfileupload;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class ClamavFileUploadServiceProvider extends ServiceProvider
8
{
9
10
    public const CONFIG = __DIR__.'/config/clamavfileupload.php';
11
    public const LANG = __DIR__.'/lang';
12
    public const DB = __DIR__.'/migrations';
13
14
    /**
15
     * Bootstrap the application services.
16
     *
17
     * @return void
18
     */
19
    public function boot()
20
    {
21
        $this->loadMigrationsFrom(static::DB);
22
        $this->loadTranslationsFrom(static::LANG, 'clamavfileupload');
23
24
        $this->publishes([
25
            static::CONFIG => config_path('clamavfileupload.php'),
26
        ], 'cfu-config');
27
        $this->publishes([
28
            static::DB => database_path('migrations'),
29
        ], 'cfu-migrations');
30
        $this->publishes([
31
            static::LANG => lang_path('vendor/clamavfileupload'),
32
        ], 'cfu-lang');
33
    }
34
35
    /**
36
     * Register the application services.
37
     *
38
     * @return void
39
     */
40
    public function register()
41
    {
42
        $this->mergeConfigFrom(
43
            static::CONFIG, 'clamavfileupload'
44
        );
45
46
        $this->app->register(EventServiceProvider::class);
47
        $this->app->register(FacadeServiceProvider::class);
48
    }
49
}
50