uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
admin.brosiper.codeskitter.site
/
app
/
Traits
/
Processor.php
/
/
<?php namespace App\Traits; use Exception; use App\Models\Setting; use App\Models\PaymentRequest; use Illuminate\Http\JsonResponse; use Illuminate\Routing\Redirector; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\App; use Illuminate\Http\RedirectResponse; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Storage; trait Processor { public function response_formatter($constant, $content = null, $errors = []): array { $constant = (array)$constant; $constant['content'] = $content; $constant['errors'] = $errors; return $constant; } public function error_processor($validator): array { $errors = []; foreach ($validator->errors()->getMessages() as $index => $error) { $errors[] = ['error_code' => $index, 'message' => self::translate($error[0])]; } return $errors; } public function translate($key) { try { App::setLocale('en'); $lang_array = include(base_path('resources/lang/' . 'en' . '/lang.php')); $processed_key = ucfirst(str_replace('_', ' ', str_ireplace(['\'', '"', ',', ';', '<', '>', '?'], ' ', $key))); if (!array_key_exists($key, $lang_array)) { $lang_array[$key] = $processed_key; $str = "<?php return " . var_export($lang_array, true) . ";"; file_put_contents(base_path('resources/lang/' . 'en' . '/lang.php'), $str); $result = $processed_key; } else { $result = __('lang.' . $key); } return $result; } catch (\Exception $exception) { return $key; } } public function payment_config($key, $settings_type): object|null { try { $config = DB::table('addon_settings')->where('key_name', $key) ->where('settings_type', $settings_type)->first(); } catch (Exception $exception) { return new Setting(); } return (isset($config)) ? $config : null; } public static function getDisk() { $config=\App\CentralLogics\Helpers::get_business_settings('local_storage'); return isset($config)?($config==0?'s3':'public'):'public'; } public function file_uploader(string $dir, string $format, $image = null, $old_image = null) { if ($image == null) return $old_image ?? 'def.png'; if (isset($old_image)) Storage::disk(self::getDisk())->delete($dir . $old_image); $imageName = \Carbon\Carbon::now()->toDateString() . "-" . uniqid() . "." . $format; if (!Storage::disk(self::getDisk())->exists($dir)) { Storage::disk(self::getDisk())->makeDirectory($dir); } Storage::disk(self::getDisk())->put($dir . $imageName, file_get_contents($image)); return $imageName; } public function payment_response($payment_info, $payment_flag): Application|JsonResponse|Redirector|RedirectResponse|\Illuminate\Contracts\Foundation\Application { $payment_info = PaymentRequest::find($payment_info->id); $token_string = 'payment_method=' . $payment_info->payment_method . '&&attribute_id=' . $payment_info->attribute_id . '&&transaction_reference=' . $payment_info->transaction_id; if (in_array($payment_info->payment_platform, ['web', 'app']) && $payment_info['external_redirect_link'] != null) { return redirect($payment_info['external_redirect_link'] . '?flag=' . $payment_flag . '&&token=' . base64_encode($token_string)); } return redirect()->route('payment-' . $payment_flag, ['token' => base64_encode($token_string)]); } }
/home/users/unlimited/www/admin.brosiper.codeskitter.site/app/Traits/Processor.php