Last active
May 15, 2026 14:31
-
-
Save codigoconjuan/447f6c5ca18e9f73af137416ab249a56 to your computer and use it in GitHub Desktop.
Gist para Resetear el nuevo password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @extends('layouts.auth') | |
| @section('title') | |
| Nueva Contraseña | |
| @endsection | |
| @section('auth-contents') | |
| <form method="POST" action="" class="mt-14 space-y-5" novalidate> | |
| @csrf | |
| <x-input-error field="token" /> | |
| <x-input-error field="email" /> | |
| <div class="flex flex-col gap-2"> | |
| <label class="font-bold text-2xl">Password</label> | |
| <input type="password" placeholder="Nuevo Password" class="w-full border border-gray-300 p-3 rounded-lg" | |
| name="password" /> | |
| </div> | |
| <x-input-error field="password" /> | |
| <div class="space-y-2"> | |
| <label class="font-bold text-2xl block" for="password_confirmation">Repetir Password</label> | |
| <input type="password" placeholder="Repite el Nuevo Password" | |
| class="w-full border border-gray-300 p-3 rounded-lg" | |
| name="password_confirmation" /> | |
| </div> | |
| <input type="hidden" name="token" value="{{ $token }}"> | |
| <input type="hidden" name="email" value="{{ $email }}"> | |
| <input type="submit" value='Guardar Password' | |
| class="bg-purple-950 hover:bg-purple-800 w-full p-3 rounded-lg text-white font-bold text-xl cursor-pointer" /> | |
| </form> | |
| @endsection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ResetPasswordRequest extends FormRequest | |
| { | |
| public function messages(): array | |
| { | |
| return [ | |
| 'token.required' => 'El token de recuperación es obligatorio.', | |
| 'email.required' => 'El correo electrónico es obligatorio.', | |
| 'email.email' => 'Debes ingresar un correo electrónico válido.', | |
| 'email.exists' => 'No encontramos una cuenta con ese correo electrónico.', | |
| 'password.required' => 'La contraseña es obligatoria.', | |
| 'password.confirmed' => 'La confirmación de la contraseña no coincide.', | |
| 'password.min' => 'La contraseña debe tener al menos :min caracteres.', | |
| ]; | |
| } | |
| public function rules(): array | |
| { | |
| return [ | |
| 'token' => ['required'], | |
| 'email' => [ | |
| 'required', | |
| 'email', | |
| 'exists:users,email' | |
| ], | |
| 'password' => [ | |
| 'required', | |
| 'confirmed', | |
| Password::min(8) | |
| // ->letters() | |
| // ->symbols() | |
| // ->numbers() | |
| ] | |
| ]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment