Completed
Push — master ( 21e199...3bbb7f )
by Feras
01:23 queued 11s
created

InstallPackage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 17 1
1
<?php
2
3
namespace Iferas93\HistoriableModel\Console\Commands;
4
5
6
use Illuminate\Console\Command;
7
8
class InstallPackage extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'historiable:install';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'publish package assets';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @return mixed
28
     */
29
    public function handle()
30
    {
31
        $this->info('Installing Historiable...');
32
        $this->info('Publishing configuration...');
33
        $this->call('vendor:publish', [
34
            '--provider' => "Iferas93\HistoriableModel\HistoriableModelServiceProvider",
35
            '--tag' => 'config',
36
        ]);
37
38
        $this->info('Publishing migrations...');
39
        $this->call('vendor:publish', [
40
            '--provider' => "Iferas93\HistoriableModel\HistoriableModelServiceProvider",
41
            '--tag' => 'migrations',
42
        ]);
43
44
        $this->info('Historiable has been Installed successfully');
45
    }
46
}
47