⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
onlinestore.ng
/
app
/
Models
/
View File Name :
ProductVariantOption.php
hasOne('App\Models\Location', 'id', 'location_id'); } public static function variant_name($name = '', $counter = 0, $product_id = 0) { $retuen_name['has_variant'] = 0; $retuen_name['name'] = 'verians['.$counter.'][name][]'; $retuen_name['has_name'][0] = 'verians['.$counter.'][name]'; $retuen_name['price'] = 'verians['.$counter.'][price]'; $retuen_name['qty'] = 'verians['.$counter.'][qty]'; $retuen_name['price_val'] = 0; $retuen_name['qty_val'] = 0; $creatorId = Auth::user()->creatorId(); if(!empty($name)) { $ProductVariantOption = ProductVariantOption::where('name', $name)->where('product_id', $product_id)->where('created_by', $creatorId)->first(); if(!empty($ProductVariantOption)) { foreach(explode(' : ', $name) as $key => $values) { $retuen_name['has_name'][$key] = 'verians['.$ProductVariantOption->id.'][variants]['.$key.'][]'; } $retuen_name['price_val'] = $ProductVariantOption->price; $retuen_name['qty_val'] = $ProductVariantOption->quantity; $retuen_name['price'] = 'verians['.$ProductVariantOption->id.'][price]'; $retuen_name['qty'] = 'verians['.$ProductVariantOption->id.'][quantity]'; $retuen_name['has_variant'] = 1; } } return $retuen_name; } public function GetVariant($productId) { $retuen_name = []; if(!empty($name)) { $ProductVariantOption = ProductVariantOption::where('product_id', $productId)->where('created_by', auth()->user()->id)->first(); if(!empty($ProductVariantOption)) { foreach(explode(' : ', $name) as $key => $values) { $retuen_name['has_name'][$key] = 'verians['.$ProductVariantOption->id.'][variants]['.$key.'][]'; } $retuen_name['price_val'] = $ProductVariantOption->price; $retuen_name['qty_val'] = $ProductVariantOption->quantity; $retuen_name['price'] = 'verians['.$ProductVariantOption->id.'][price]'; $retuen_name['qty'] = 'verians['.$ProductVariantOption->id.'][quantity]'; $retuen_name['has_variant'] = 1; } } return $retuen_name; } public function getproductbyvariantId($id){ return Product::find($id)->variants_json; } }