diff --git a/modules/Mailgateway/Components/Form.php b/modules/Mailgateway/Components/Form.php index 650da197..1dda7427 100644 --- a/modules/Mailgateway/Components/Form.php +++ b/modules/Mailgateway/Components/Form.php @@ -42,16 +42,14 @@ class Form extends Component ]; } - public function mount(?string $model = null): void + public function mount(?Mailgateway $model = null): void { $this->types = app('mail-gateways')->map(fn ($gateway) => [ 'name' => $gateway::name(), 'id' => $gateway, ]); - $model = Mailgateway::find($model); - - if ($model) { + if ($model->getRouteKey()) { $this->id = $model->id; $this->name = $model->name; $this->domain = $model->domain; diff --git a/modules/Mailgateway/Components/setting-view.blade.php b/modules/Mailgateway/Components/setting-view.blade.php index d4b2c45f..3dfcd6cd 100644 --- a/modules/Mailgateway/Components/setting-view.blade.php +++ b/modules/Mailgateway/Components/setting-view.blade.php @@ -9,7 +9,7 @@ Aktion - Neu + Neu @foreach ($data as $index => $gateway)