/
marklis
/
anticafe-breeze
Обзор
Документация
Войти
/
marklis
/
anticafe-breeze
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
app/Http/Controllers/Auth/ConfirmablePasswordController.php
41 строка
1 KB
Мамонов Алексей Анатольевич
Инициализация
06 мар 2025, 17:45
06 мар 2025, 17:45
0f37205
Код
Авторство
О чём код?
<?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)); } }