Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replace localhost with real domain name in reset password of Laravel 5

Tags:

I am using the default resetting passwords in Laravel 5.4. The function works fine, and the email with reset password link is successfully sent/received.

However, it still not show the real domain but 'localhost' like something below:

http://localhost/password/reset/4c16a78f3c1216de566bc0689694980ac53555311d0214bbb73fbc72870a91f5

Can you tell me how to replace 'localhost' with domainname.com?

And is it OK to do this with http:// instead of https:// ?

like image 312
Devith Avatar asked Jul 03 '17 08:07

Devith


1 Answers

Change the APP_URL parameter in your .env file to adapt the app's domain name.

APP_URL=http://localhost to APP_URL=https://yourdomain.com

If you cache your config (which you shouldn't do in local or test environment but definitely in production), don't forget to use the php artisan config:clear command.

like image 137
manniL Avatar answered Sep 27 '22 20:09

manniL