I am a novice web developer. I am following the password reset tutorial for laravel 5.1 found here
Currently the default view they are listing in their documentation asks the user to type his/her email into the form. I was wondering how I could just set the reset email using the users email I already have in my DB and posted to the URL the form below has.
I can get the logged in users email like this:
App\User::find(Auth::user()->id)->email
the form
<form method="POST" action="dashboars/password/email">
{!! csrf_field() !!}
@if (count($errors) > 0)
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
<div>
Email
<input type="email" name="email" value="{{ old('email') }}">
<!-- how can I just use the email I have in my DB instead of input-->
</div>
<div>
<button type="submit">
Send Password Reset Link
</button>
</div>
</form>
I know it must be quite simple, can anyone help me with this novice problem? Keep in mind that everything else about resetting the password is default Laravel solution from the documentation.
Thank you for any kind of help :)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire