<?php
 namespace App\Http\Controllers\Admin\Auth; use App\Http\Controllers\Controller; use Illuminate\Auth\Events\Validated; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Validation\ValidationException; use Illuminate\View\View; final class ConfirmablePasswordController extends Controller { public function show(): View { return view('admin.auth.confirm-password'); } public function store(Request $request): RedirectResponse { $admin = Auth::guard('admin')->user(); if (! $admin || ! Auth::guard('admin')->validate([ 'email' => $admin->email, 'password' => (string) $request->input('password'), ])) { throw ValidationException::withMessages([ 'password' => __('auth.password'), ]); } event(new Validated('admin', $admin)); $request->session()->put('auth.password_confirmed_at', time()); return redirect()->intended(route('admin.dashboard')); } } 