vendredi 18 septembre 2015

Laravel 5.1 - Built in password reset functionality not sending email with token

OVERVIEW:

I'm creating a password reset functionality using the built in system in Laravel 5.1, I have followed the instructions exactly how it says here.

The view in resources/views/emails/password.blade.php receives a variable $token which contains the password reset token to match the user to the password reset request. Within the view, I have the following code which is supposed to create a URL link of the page where the user set the new password:

   Click here to reset your password: {{ url('password/reset/'.$token) }}

PROBLEM:

It does not send the email at all. But I have realized that, if I remove the last trailing slash (see below):

   Click here to reset your password: {{ url('password/reset'.$token) }}

I receive something like http://ift.tt/1QLHZ1o...

CONCLUSION:

Whenever there is a trailing slash between password/reset/ and the $token, the email is not sent. Even when I manually type the URL.

Why would the / before the $token affect on the email being sent? Any ideas?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire