unit = setting('units.temperature'); $this->instance = new TemperatureUnit($value, $unit); $this->units = [ 'F' => round($this->instance->toUnit('F'), 2), 'f' => round($this->instance->toUnit('F'), 2), 'C' => round($this->instance->toUnit('C'), 2), 'c' => round($this->instance->toUnit('C'), 2), ]; } }