libraryItem forms added

This commit is contained in:
HolgerHatGarKeineNode
2023-02-11 20:13:16 +01:00
parent fbb1a781cc
commit b528f509dd
24 changed files with 576 additions and 53 deletions

View File

@@ -32,6 +32,9 @@ class CityForm extends Component
if (!$this->city) {
$this->city = new City();
}
if (!$this->fromUrl) {
$this->fromUrl = url()->previous();
}
}
public function save()
@@ -39,7 +42,7 @@ class CityForm extends Component
$this->validate();
$this->city->save();
return redirect($this->fromUrl);
return redirect($this->fromUrl ?? url()->route('welcome'));
}
public function render()