- Install Laravel 12 with Breeze (Vue stack + Inertia.js) - Configure Pest testing framework (5 tests passing) - Add Docker multi-stage build (PHP 8.3 + LibreOffice + ImageMagick) - Create docker-compose.yml with app + node services - Configure Vite for Docker hot-reload - Set app locale to 'de' (German) - Add Vue packages: @vueuse/core, vue-draggable-plus, vue3-dropzone - Update .env.example with all project vars - Relocate spike files: src/Cts/ → app/Cts/ (Laravel autoload) - Tests: 5 passed (14 assertions) - Vite build: successful - Docker: app container running Task: T1 - Laravel Scaffolding + Breeze Vue + Docker
42 lines
1 KiB
PHP
42 lines
1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\RedirectResponse;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Validation\ValidationException;
|
|
use Inertia\Inertia;
|
|
use Inertia\Response;
|
|
|
|
class ConfirmablePasswordController extends Controller
|
|
{
|
|
/**
|
|
* Show the confirm password view.
|
|
*/
|
|
public function show(): Response
|
|
{
|
|
return Inertia::render('Auth/ConfirmPassword');
|
|
}
|
|
|
|
/**
|
|
* Confirm the user's password.
|
|
*/
|
|
public function store(Request $request): RedirectResponse
|
|
{
|
|
if (! Auth::guard('web')->validate([
|
|
'email' => $request->user()->email,
|
|
'password' => $request->password,
|
|
])) {
|
|
throw ValidationException::withMessages([
|
|
'password' => __('auth.password'),
|
|
]);
|
|
}
|
|
|
|
$request->session()->put('auth.password_confirmed_at', time());
|
|
|
|
return redirect()->intended(route('dashboard', absolute: false));
|
|
}
|
|
}
|