/** * 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); } }
/** * 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); }