AddressServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Sfneal\Address\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class AddressServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap any Address services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        // Publish migration file (if not already published)
17
        if (! class_exists('CreateAddressTable')) {
18
            $this->publishes([
19
                __DIR__.'/../../database/migrations/create_address_table.php.stub' => database_path(
20
                    'migrations/'.date('Y_m_d_His', time()).'_create_address_table.php'
21
                ),
22
            ], 'migration');
23
        }
24
    }
25
}
26