Completed
Push — master ( b948a4...365298 )
by CodexShaper
05:34
created

DatabaseMigrate   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
ccs 0
cts 5
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace CodexShaper\DBM\Commands;
4
5
use Illuminate\Console\Command;
6
use Symfony\Component\Console\Input\InputOption;
7
8
class DatabaseMigrate extends Command
9
{
10
    /**
11
     * The console command name.
12
     *
13
     * @var string
14
     */
15
    protected $name = 'dbm:migrate';
16
    /**
17
     * The console command description.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Migrate the Laravel Database Manager';
22
23
    /**
24
     * Execute the console command.
25
     *
26
     * @param \Illuminate\Filesystem\Filesystem $filesystem
27
     *
28
     * @return void
29
     */
30
    public function handle()
31
    {
32
        $migrationPath = config('dbm.migrations', '/vendor/codexshaper/laravel-database-manager/database/migrations');
33
        // Migrate Database
34
        $this->info('Migrating the database manager tables into your application');
35
        $this->call('migrate', ['--path' => $migrationPath, '--force' => 'force']);
36
    }
37
}
38