Example #1
0
 /**
  * Magic Method allows for user input as an object
  *
  * @param $option
  *
  * @return mixed | null
  */
 public function __get($option)
 {
     if ($option == 'price') {
         return \LaraCart::formatMoney(array_get($this->options, $option), $this->locale, $this->internationalFormat);
     } else {
         return array_get($this->options, $option);
     }
 }
Example #2
0
 /**
  * Displays the type of value it is for the user
  *
  * @return mixed
  */
 public function displayValue($locale = null, $internationalFormat = null)
 {
     return \LaraCart::formatMoney($this->value, $locale, $internationalFormat);
 }