LaravelApplicantServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Te7aHoudini\LaravelApplicant;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LaravelApplicantServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        if ($this->app->runningInConsole()) {
12
            $this->publishes([
13
                __DIR__.'/../config/laravel-applicant.php' => config_path('laravel-applicant.php'),
14
            ], 'config');
15
16
            $this->publishes([
17
                __DIR__.'/../database/migrations/create_applications_table.php.stub' => $this->app->databasePath().'/migrations/'.date('Y_m_d_His').'_create_applications_table.php',
18
            ], 'migrations');
19
        }
20
    }
21
22
    public function register()
23
    {
24
        $this->mergeConfigFrom(__DIR__.'/../config/laravel-applicant.php', 'laravel-applicant');
25
    }
26
}
27