Angel
Angel

Reputation: 1009

Laravel 5.7: Forgot Password using localhost

I execute the command

php artisan auth

I improved it in a bit such as:

1) Added username field in registration
2) Login using email or username
3) Added a "Show Password" checkbox in registration

The video that I'm watching regarding to login,registration and forgot password instead of using the mailtrap he changed it to log.

.env

MAIL_DRIVER=log // from smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

It will create a new file in my storage but when I paste the link

http://localhost/password/reset/79c928010990374851c949776d95a86a248364df3625c643baaf13f81787b694

it gives me an error "Object not found!".

Question: How can I fix this error?

Upvotes: 0

Views: 2620

Answers (3)

Emmanuel Nwolisa
Emmanuel Nwolisa

Reputation: 21

Copy the reset password link. Replace localhost with 127.0.0.1:8000 and paste it in the URL bar.

Upvotes: 0

engrhussainahmad
engrhussainahmad

Reputation: 1134

If you run the script through php artisan serve command then the url in the reset password will exist localhost which must be replaced with 127.0.0.1:8000 if there is no port given in the param. If you run the command with --port="The port you rant to run on" then replace 8000 port and enjoy it.

Upvotes: 0

Angel
Angel

Reputation: 1009

Thanks to @Rajender Verma, I realized that instead of localhost/password/reset/token it should be 127.0.0.1:8000/password/reset/token

Upvotes: 1

Related Questions