public function getCountryList() { $country_list_arr = array(); $country_arr = CurrencyExchangeRate::whereRaw("status = ? ORDER BY country", array('Active'))->get(array('country', 'country_code')); foreach ($country_arr as $value) { $country_list_arr[$value['country_code']] = $value['country']; } return $country_list_arr; }
/** * CUtil::chkIsValidCurrency() * added by periyasami_145at11 * * @param mixed $currency_code * @return */ public static function chkIsValidCurrency($currency_code) { $details = array(); $selected_currency_code = CurrencyExchangeRate::whereRaw('currency_code= ? AND status = "Active" AND display_currency = "Yes" ', array($currency_code))->first(); if (count($selected_currency_code)) { $details['country'] = $selected_currency_code['country']; $details['currency_code'] = $selected_currency_code['currency_code']; $details['exchange_rate'] = $selected_currency_code['exchange_rate']; $details['currency_symbol'] = $selected_currency_code['currency_symbol']; } return $details; }