'boolean', 'rate_limit' => 'nullable|integer|min:1|max:100', 'password_min' => 'nullable|integer|min:6|max:128', ]; } public function mount(): void { $this->twofa_enabled = (bool) Setting::get('twofa_enabled', $this->twofa_enabled); $this->rate_limit = (int) Setting::get('rate_limit', $this->rate_limit); $this->password_min = (int) Setting::get('password_min', $this->password_min); } public function save(): void { $this->validate(); Setting::put('twofa_enabled', $this->twofa_enabled); Setting::put('rate_limit', $this->rate_limit); Setting::put('password_min', $this->password_min); $this->dispatch('toast', type: 'done', badge: 'Sicherheit', title: 'Sicherheit gespeichert', text: '2FA/Rate-Limits/Passwortregeln wurden übernommen.', duration: 5000, ); } public function render() { return view('livewire.ui.system.form.security-form'); } }