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

DatabaseMigrate::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 5
cp 0
crap 2
rs 10
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