unit = setting('units.speed'); $this->instance = new VelocityUnit($value, $unit); $this->units = [ 'knots' => round($this->instance->toUnit('knots'), 2), 'km/h' => round($this->instance->toUnit('km/h'), 2), ]; } }