Reputation: 181
When i click on Reset Password and fill the email and submit it.. then I am getting email for reset but URL is localhost my project is on production server.
In my config\app.php:
'url' => env('DB_HOST'),
and
I also try this : 'url' => env('APP_URL', 'http://yourtradelog.com'),
this is my env. file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=**7
MAIL_USERNAME=apikey
MAIL_PASSWORD=SG.E*****hSbq1IAhFC1tPQg.uFah8Jwtm6GY7lh10wGpA_CPU01ySmAC26HFylz_BFI
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="Your Trade Log"
MAIL_FROM_ADDRESS=****@yourtradelog.com
This is my reset...:
public function toMail($notifiable)
{
if (static::$toMailCallback) {
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}
return (new MailMessage)
->subject(Lang::getFromJson('Reset Password Notification from YourTradeLog.com'))
->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.'))
->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', $this->token, false)))
->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
}
Upvotes: 1
Views: 2291
Reputation: 15941
Run the following commands
php artisan clear-compiled
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan config:clear
Also in your .env
set the APP_URL=http://yourtradelog.com
Upvotes: 3