⚝
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
/
mydetails.com.ng
/
app
/
Repositories
/
View File Name :
UserSettingRepository.php
fieldSearchable; } /** * {@inheritDoc} */ public function model() { return UserSetting::class; } public function update($input, $id) { $inputArr = Arr::except($input, ['_token', 'sectionName']); $inputArr['stripe_enable'] = isset($inputArr['stripe_enable']) ? '1' : '0'; $inputArr['paypal_enable'] = isset($inputArr['paypal_enable']) ? '1' : '0'; $inputArr['enable_affiliation'] = isset($inputArr['enable_affiliation']) ? '1' : '0'; $inputArr['enable_contact'] = isset($inputArr['enable_contact']) ? '1' : '0'; $inputArr['hide_stickybar'] = isset($inputArr['hide_stickybar']) ? '1' : '0'; $inputArr['whatsapp_share'] = isset($inputArr['whatsapp_share']) ? '1' : '0'; foreach ($inputArr as $key => $value) { /** @var UserSetting $setting */ $setting = UserSetting::where('key', $key)->where('user_id', $id)->first(); if (! $setting) { UserSetting::create([ 'user_id' => $id, 'key' => $key, 'value' => $value, ]); } else { $setting->update(['value' => $value]); } } return $setting; } }