Last active
May 15, 2026 01:27
-
-
Save codigoconjuan/67f719fd773e7d4ec867e6c0967d24aa to your computer and use it in GitHub Desktop.
Vista y Request para Forgot Password en Laravel
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') | |
| Olvide mi Password | |
| @endsection | |
| @section('auth-contents') | |
| <form method="POST" action="" class="mt-10 space-y-5" novalidate> | |
| @csrf | |
| <div class="flex flex-col gap-2"> | |
| <label class="font-bold text-2xl" for="email">Email</label> | |
| <input id="email" type="email" placeholder="Email de Registro" | |
| class="w-full border border-gray-300 p-3 rounded-lg" name="email" /> | |
| </div> | |
| <x-input-error field="email" /> | |
| <input type="submit" value='Enviar Instrucciones' | |
| 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 ForgotPasswordRequest extends FormRequest | |
| { | |
| public function messages(): array | |
| { | |
| return [ | |
| 'email.required' => 'El correo electrónico es obligatorio.', | |
| 'email.email' => 'Ingresa un correo electrónico válido.', | |
| 'email.exists' => 'No encontramos una cuenta con ese correo electrónico.', | |
| ]; | |
| } | |
| public function rules(): array | |
| { | |
| return [ | |
| 'email' => ['required', 'email', 'exists:users,email'], | |
| ]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment