コード例 #1
0
 /**
  * Return the currency symbol.
  *
  * @return string|null
  */
 public function symbol()
 {
     if (($key = $this->object->getValue()) === null) {
         return null;
     }
     return config('streams::currencies.supported.' . $key . '.symbol');
 }
コード例 #2
0
 /**
  * Return the selection value.
  *
  * @return string|null
  */
 public function value()
 {
     $options = $this->object->getOptions();
     if (!($key = $this->object->getValue())) {
         return null;
     }
     return trans(array_get($options, $key));
 }