convert , to .

This commit is contained in:
HolgerHatGarKeineNode
2023-02-21 20:48:31 +01:00
parent 2a0c39ff17
commit be33b01754

View File

@@ -37,23 +37,15 @@ class CityForm extends Component
} }
} }
public function updatedCityLongitude($value)
{
$this->city->longitude = str($value)
->replace(',', '.')
->toFloat();
}
public function updatedCityLatitude($value)
{
$this->city->latitude = str($value)
->replace(',', '.')
->toFloat();
}
public function save() public function save()
{ {
$this->validate(); $this->validate();
$this->city->longitude = str($this->city->longitude)
->replace(',', '.')
->toFloat();
$this->city->latitude = str($this->city->latitude)
->replace(',', '.')
->toFloat();
$this->city->save(); $this->city->save();
return redirect($this->fromUrl ?? url()->route('welcome')); return redirect($this->fromUrl ?? url()->route('welcome'));