Features::canManageTwoFactorAuthentication(), ]; if (Features::canManageTwoFactorAuthentication()) { $request->ensureStateIsValid(); $props['twoFactorEnabled'] = $request->user()->hasEnabledTwoFactorAuthentication(); $props['requiresConfirmation'] = Features::optionEnabled(Features::twoFactorAuthentication(), 'confirm'); } return Inertia::render('settings/Security', $props); } /** * Update the user's password. */ public function update(PasswordUpdateRequest $request): RedirectResponse { $request->user()->update([ 'password' => $request->password, ]); Inertia::flash('toast', ['type' => 'success', 'message' => __('Password updated.')]); return back(); } }