uawdijnntqw1x1x1
IP : 216.73.216.145
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
/
Modules
/
..
/
app
/
Services
/
AddonService.php
/
/
<?php namespace App\Services; use Exception; use Illuminate\Http\Request; use Illuminate\Support\Facades\Config; use Rap2hpoutre\FastExcel\FastExcel; class AddonService { public function getAddData(Object $request): array { return [ 'name' => $request->name[array_search('default', $request->lang)], 'price' => $request->price, 'store_id' => $request->store_id, ]; } public function getImportData(Request $request, bool $toAdd = true): array { try { $collections = (new FastExcel)->import($request->file('products_file')); } catch (Exception) { return ['flag' => 'wrong_format']; } $data = []; foreach ($collections as $collection) { if ($collection['Name'] === "" || !is_numeric($collection['StoreId'])) { return ['flag' => 'required_fields']; } if(isset($collection['Price']) && ($collection['Price'] < 0 ) ) { return ['flag' => 'price_range']; } $array = [ 'name' => $collection['Name'], 'price' => $collection['Price'], 'store_id' => $collection['StoreId'], 'status' => $collection['Status'] == 'active' ? 1 : 0, 'created_at'=>now(), 'updated_at'=>now() ]; if(!$toAdd){ $array['id'] = $collection['Id']; } $data[] = $array; } return $data; } public function getBulkExportData(object $collection): array { $data = []; foreach($collection as $key=>$item){ $data[] = [ 'Id'=>$item->id, 'Name'=>$item->name, 'Price'=>$item->price, 'StoreId'=>$item->store_id, 'Status'=>$item->status == 1 ? 'active' : 'inactive' ]; } return $data; } }
/home/users/unlimited/www/admin.brosiper.codeskitter.site/Modules/../app/Services/AddonService.php