mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 09:11:10 -05:00
- Added rides index view with search and filter options. - Created rides show view to display ride details. - Implemented API routes for rides. - Developed authentication routes for user registration, login, and email verification. - Created tests for authentication, email verification, password reset, and user profile management. - Added feature tests for rides and operators, including creation, updating, deletion, and searching. - Implemented soft deletes and caching for rides and operators. - Enhanced manufacturer and operator model tests for various functionalities.
80 lines
2.5 KiB
PHP
80 lines
2.5 KiB
PHP
<?php
|
|
|
|
use App\Livewire\Actions\Logout;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Livewire\Volt\Component;
|
|
|
|
new class extends Component
|
|
{
|
|
public string $password = '';
|
|
|
|
/**
|
|
* Delete the currently authenticated user.
|
|
*/
|
|
public function deleteUser(Logout $logout): void
|
|
{
|
|
$this->validate([
|
|
'password' => ['required', 'string', 'current_password'],
|
|
]);
|
|
|
|
tap(Auth::user(), $logout(...))->delete();
|
|
|
|
$this->redirect('/', navigate: true);
|
|
}
|
|
}; ?>
|
|
|
|
<section class="space-y-6">
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
{{ __('Delete Account') }}
|
|
</h2>
|
|
|
|
<p class="mt-1 text-sm text-gray-600">
|
|
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }}
|
|
</p>
|
|
</header>
|
|
|
|
<x-danger-button
|
|
x-data=""
|
|
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
|
|
>{{ __('Delete Account') }}</x-danger-button>
|
|
|
|
<x-modal name="confirm-user-deletion" :show="$errors->isNotEmpty()" focusable>
|
|
<form wire:submit="deleteUser" class="p-6">
|
|
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
{{ __('Are you sure you want to delete your account?') }}
|
|
</h2>
|
|
|
|
<p class="mt-1 text-sm text-gray-600">
|
|
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}
|
|
</p>
|
|
|
|
<div class="mt-6">
|
|
<x-input-label for="password" value="{{ __('Password') }}" class="sr-only" />
|
|
|
|
<x-text-input
|
|
wire:model="password"
|
|
id="password"
|
|
name="password"
|
|
type="password"
|
|
class="mt-1 block w-3/4"
|
|
placeholder="{{ __('Password') }}"
|
|
/>
|
|
|
|
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
|
</div>
|
|
|
|
<div class="mt-6 flex justify-end">
|
|
<x-secondary-button x-on:click="$dispatch('close')">
|
|
{{ __('Cancel') }}
|
|
</x-secondary-button>
|
|
|
|
<x-danger-button class="ms-3">
|
|
{{ __('Delete Account') }}
|
|
</x-danger-button>
|
|
</div>
|
|
</form>
|
|
</x-modal>
|
|
</section>
|