UpdatePackage::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 25
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 13
c 4
b 0
f 0
dl 0
loc 25
rs 9.8333
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\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