1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Mydnic\Kustomer\Console; |
4
|
|
|
|
5
|
|
|
use Illuminate\Support\Str; |
6
|
|
|
use Illuminate\Console\Command; |
7
|
|
|
|
8
|
|
|
class PublishCommand extends Command |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* The name and signature of the console command. |
12
|
|
|
* |
13
|
|
|
* @var string |
14
|
|
|
*/ |
15
|
|
|
protected $signature = 'kustomer:publish {--force : Overwrite any existing files}'; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* The console command description. |
19
|
|
|
* |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
protected $description = 'Publish all of the Kustomer Feedback resources'; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Execute the console command. |
26
|
|
|
* |
27
|
|
|
* @return void |
28
|
|
|
*/ |
29
|
|
|
public function handle() |
30
|
|
|
{ |
31
|
|
|
$this->comment('Publishing Kustomer Assets...'); |
32
|
|
|
$this->call('vendor:publish', [ |
33
|
|
|
'--tag' => 'kustomer-assets', |
34
|
|
|
'--force' => $this->option('force'), |
35
|
|
|
]); |
36
|
|
|
|
37
|
|
|
$this->comment('Publishing Kustomer Configuration...'); |
38
|
|
|
$this->call('vendor:publish', [ |
39
|
|
|
'--tag' => 'kustomer-config', |
40
|
|
|
'--force' => $this->option('force'), |
41
|
|
|
]); |
42
|
|
|
|
43
|
|
|
$this->comment('Publishing Kustomer Translation Files...'); |
44
|
|
|
$this->call('vendor:publish', [ |
45
|
|
|
'--tag' => 'kustomer-locales', |
46
|
|
|
'--force' => $this->option('force'), |
47
|
|
|
]); |
48
|
|
|
|
49
|
|
|
$this->comment('Publishing Kustomer View Files...'); |
50
|
|
|
$this->call('vendor:publish', [ |
51
|
|
|
'--tag' => 'kustomer-views', |
52
|
|
|
'--force' => $this->option('force'), |
53
|
|
|
]); |
54
|
|
|
|
55
|
|
|
$this->info('Kustomer scaffolding installed successfully.'); |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|