UpdatePackage   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 1
eloc 16
c 4
b 0
f 0
dl 0
loc 31
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 25 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\SettingsSeeder;
9
use Mongi\Mongicommerce\Seedeers\StasusesOrderSeeder;
10
use Mongi\Mongicommerce\Seedeers\TypesPaymentSeeder;
11
12
class UpdatePackage extends Command
13
{
14
    protected $signature = 'mongicommerce:update';
15
16
    protected $description = 'Update mongicommerce';
17
18
    public function handle()
19
    {
20
21
        $this->alert('Updating Mongicommerce...');
22
23
        $this->info('Updating configuration...');
24
25
        $this->call('vendor:publish', [
26
            '--provider' => "Mongi\Mongicommerce\MongicommerceServiceProvider",
27
            '--tag' => "config"
28
        ]);
29
30
        $this->info('Updating Admin Template');
31
32
        $this->call('vendor:publish', [
33
            '--provider' => "Mongi\Mongicommerce\MongicommerceServiceProvider",
34
            '--tag' => "assets"
35
        ]);
36
37
        $this->call('vendor:publish', [
38
            '--provider' => "Mongi\Mongicommerce\MongicommerceServiceProvider",
39
            '--tag' => "views"
40
        ]);
41
        
42
        $this->alert('Update successfully');
43
    }
44
}
45