diff --git a/app/Livewire/Setup/Wizard.php b/app/Livewire/Setup/Wizard.php index 8c83a82..345d71e 100644 --- a/app/Livewire/Setup/Wizard.php +++ b/app/Livewire/Setup/Wizard.php @@ -47,12 +47,16 @@ class Wizard extends Component public function mount(): void { - $this->instance_name = config('app.name', 'Mailwolt'); - $this->timezone = Setting::get('timezone', 'Europe/Berlin'); - $this->locale = Setting::get('locale', 'de'); - $this->ui_domain = Setting::get('ui_domain', ''); - $this->mail_domain = Setting::get('mail_domain', ''); - $this->webmail_domain = Setting::get('webmail_domain', ''); + $this->instance_name = config('app.name', 'Mailwolt'); + try { + $this->timezone = Setting::get('timezone', 'Europe/Berlin'); + $this->locale = Setting::get('locale', 'de'); + $this->ui_domain = Setting::get('ui_domain', ''); + $this->mail_domain = Setting::get('mail_domain', ''); + $this->webmail_domain = Setting::get('webmail_domain', ''); + } catch (\Throwable) { + // DB noch nicht migriert — Standardwerte bleiben + } } public function updatedUiDomain(): void { $this->fillEmptyDomains($this->ui_domain); } diff --git a/routes/web.php b/routes/web.php index 255acef..85cf22b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -13,7 +13,11 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; Route::get('/', function () { - $setupDone = \App\Models\Setting::get('setup_completed', '0') === '1'; + try { + $setupDone = \App\Models\Setting::get('setup_completed', '0') === '1'; + } catch (\Throwable) { + $setupDone = false; + } if (!$setupDone) { return redirect()->route('setup'); }