fill($data); $group_setting->save(); if(array_key_exists('company_logo', $data) && $data['company_logo'] == '') { $settings = $group_setting->settings; unset($settings->company_logo); $group_setting->settings = $settings; $group_setting->save(); } return $group_setting; } }