DeployMigrationServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 13 2
1
<?php
2
3
4
namespace Quantick\DeployMigration;
5
6
7
use Illuminate\Support\ServiceProvider;
8
use Quantick\DeployMigration\Commands\CreateMigrationCommand;
9
use Quantick\DeployMigration\Commands\RunDeployMigrationsCommand;
10
11
class DeployMigrationServiceProvider extends ServiceProvider
12
{
13
    public function boot()
14
    {
15
        $this->loadMigrationsFrom(__DIR__ . '/migrations');
16
17
        if ($this->app->runningInConsole()) {
18
            $this->commands([
19
                RunDeployMigrationsCommand::class,
20
                CreateMigrationCommand::class
21
            ]);
22
        }
23
24
        $this->publishes([
25
            __DIR__ . '/Config' => config_path()
26
        ]);
27
    }
28
29
    /**
30
     *
31
     */
32
    public function register()
33
    {
34
        $this->mergeConfigFrom(__DIR__ . '/Config/deploy-migration.php', 'deploy-migration');
35
    }
36
}