Passed
Push — master ( a50708...5e7214 )
by Gianluca
04:57
created

InstallPackage::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
c 1
b 0
f 1
dl 0
loc 17
rs 9.9332
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace Mongi\Mongicommerce\Console;
5
6
use Illuminate\Console\Command;
7
use Illuminate\Support\Facades\Artisan;
8
use Mongi\Mongicommerce\Seedeers\DetailTypeSeeder;
9
10
class InstallPackage extends Command
11
{
12
    protected $signature = 'mongicommerce:install';
13
14
    protected $description = 'Install mongicommerce';
15
16
    public function handle()
17
    {
18
        $this->info('Installing Mongicommerce...');
19
20
        $this->info('Publishing configuration...');
21
22
        $this->call('vendor:publish', [
23
            '--provider' => "Mongi\Mongicommerce\MongicommerceServiceProvider",
24
            '--tag' => "config"
25
        ]);
26
27
28
        $this->info('Installig Tables');
29
        Artisan::call('migrate:refresh');
30
        $this->info('Installig Options');
31
        $this->call(DetailTypeSeeder::class);
32
        $this->info('Terminate successfully');
33
    }
34
}
35