- 83 Komponenten: Livewire\Volt\Component → Livewire\Component
- 73 Routen (admin, auth, customer): Volt::route() → Route::livewire()
- 88 Testdateien: Volt::test/actingAs → Livewire::test/actingAs
- VoltServiceProvider gelöscht; composer remove livewire/volt
- config/livewire.php auf v4-Schlüssel (component_layout, component_placeholder,
component_locations, make_command: SFC ohne ⚡). Der alte Schlüssel layout war
wirkungslos; alle gerouteten Komponenten setzen ihr Layout selbst.
- CLAUDE.md, AGENTS.md, boost.json, .cursorrules, Skill volt-development
- Roadmap: erledigt; Larastan erfasst SFCs weiterhin nicht (Blade-Dateien)
Suite 2.325 grün, einer übersprungen; Larastan und Pint ohne Meldung;
route:cache und view:cache laufen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
2.6 KiB
PHP
80 lines
2.6 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Validation\Rules\Password;
|
|
use Illuminate\Validation\ValidationException;
|
|
use Livewire\Attributes\Layout;
|
|
use Livewire\Component;
|
|
|
|
new #[Layout('components.layouts.app')] class extends Component
|
|
{
|
|
public string $current_password = '';
|
|
|
|
public string $password = '';
|
|
|
|
public string $password_confirmation = '';
|
|
|
|
/**
|
|
* Update the password for the currently authenticated user.
|
|
*/
|
|
public function updatePassword(): void
|
|
{
|
|
try {
|
|
$validated = $this->validate([
|
|
'current_password' => ['required', 'string', 'current_password'],
|
|
'password' => ['required', 'string', Password::defaults(), 'confirmed'],
|
|
]);
|
|
} catch (ValidationException $e) {
|
|
$this->reset('current_password', 'password', 'password_confirmation');
|
|
|
|
throw $e;
|
|
}
|
|
|
|
Auth::user()->update([
|
|
'password' => Hash::make($validated['password']),
|
|
]);
|
|
|
|
$this->reset('current_password', 'password', 'password_confirmation');
|
|
|
|
$this->dispatch('password-updated');
|
|
}
|
|
}; ?>
|
|
|
|
<section class="w-full">
|
|
@include('partials.settings-heading')
|
|
|
|
<x-settings.layout :heading="__('Update password')" :subheading="__('Ensure your account is using a long, random password to stay secure')">
|
|
<form wire:submit="updatePassword" class="space-y-5">
|
|
<flux:input
|
|
wire:model="current_password"
|
|
:label="__('Current password')"
|
|
type="password"
|
|
required
|
|
autocomplete="current-password"
|
|
/>
|
|
<flux:input
|
|
wire:model="password"
|
|
:label="__('New password')"
|
|
type="password"
|
|
required
|
|
autocomplete="new-password"
|
|
/>
|
|
<flux:input
|
|
wire:model="password_confirmation"
|
|
:label="__('Confirm Password')"
|
|
type="password"
|
|
required
|
|
autocomplete="new-password"
|
|
/>
|
|
|
|
<div class="flex items-center gap-4 pt-2 border-t border-[color:var(--color-bg-rule)]">
|
|
<flux:button variant="primary" type="submit">{{ __('Save') }}</flux:button>
|
|
|
|
<x-action-message on="password-updated">
|
|
<span class="text-[12px] text-[color:var(--color-gain-deep)]">{{ __('Saved.') }}</span>
|
|
</x-action-message>
|
|
</div>
|
|
</form>
|
|
</x-settings.layout>
|
|
</section>
|