enabled = app(TotpService::class)->isEnabled(Auth::user()); } #[On('2fa-status-changed')] public function refresh(): void { $this->enabled = app(TotpService::class)->isEnabled(Auth::user()); } public function disable(): void { app(TotpService::class)->disable(Auth::user()); session()->forget('2fa_verified'); $this->enabled = false; $this->dispatch('toast', type: 'done', badge: '2FA', title: 'TOTP deaktiviert', text: '2FA wurde deaktiviert. Melde dich erneut an um es wieder zu aktivieren.', duration: 5000); } public function render() { return view('livewire.ui.system.two-fa-status'); } }