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

InstallPackage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 13
c 1
b 0
f 1
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 17 1
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