join('tblhostingconfigoptions', 'tblproductconfigoptions.id', '=', 'tblhostingconfigoptions.configid') ->where('tblhostingconfigoptions.relid', '=', $productID) ->where('tblproductconfigoptions.optionname', 'like', $optionName.'%') ->select('*') ->get(); return $configOption->pull(0); } /** * Helper to perform Configurable Options queries for module * * @param int $optionID * @param array $optionValues * @return bool */ public function updateConfigurableOption(int $optionID, array $optionValues) { try { $updateOption = Capsule::table('tblhostingconfigoptions') ->where('id', $optionID) ->update($optionValues); } catch (\Exception $e) { logModuleCall( 'kerioEmail', __FUNCTION__, $updateOption, 'Error: could not update option ' . $optionID .' in database.', $e->getMessage() ); return false; } return true; } }