attributes['code'] = strtoupper($code); } /** * Get the currency_exchange associated with the currency. */ public function CurrencyExchangeRate() { return $this->hasOne(CurrencyExchangeRateProxy::modelClass(), 'target_currency'); } }