Passed
Push — master ( e5b31a...cf340d )
by Arthur
04:48
created

DatabaseResetCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 27
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace Foundation\Console;
4
5
use Artisan;
6
use Foundation\Services\BootstrapRegistrarService;
7
use Illuminate\Console\Command;
8
9
class DatabaseResetCommand extends Command
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $signature = 'db:reset';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Clear all tables/collections and reseed.';
24
25
    /**
26
     * Execute the console command.
27
     *
28
     * @return void
29
     */
30
    public function handle()
31
    {
32
        Artisan::call('migrate:fresh');
33
        Artisan::call('cache:clear');
34
        Artisan::call('db:seed');
35
        $this->info('Database has been reset!');
36
    }
37
}
38