重置密码链接没有重定向到laravel中的重置密码页面



在我的网站上,首先它是工作的,突然昨天我得到了这个错误,步骤如下

  1. 请求重置密码
  2. 收到邮件时点击重置密码
  3. 我得到以下链接重置我的密码重置密码按钮http://sitename.com/password/reset/3f9674ddbe57a2f3f1b94495e9b1cc94593b7e0f861d92eb534739a47f2f2f34?email=vishal%40gmail.com

但是点击该链接会被重定向到带有以下url的网站主页https://sitename.com/index.php?email=vishal%40gamil.com

Resetpassword.php

public function toMail($notifiable)
{
if (static::$toMailCallback) {
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}
return (new MailMessage)
->subject(Lang::getFromJson('Password Password'))
->line(new HtmlString("<h1 style='text-align: center;'>Password Reset</h1>"))
->line(new HtmlString("<center>You have requestd a password reset <br /> Please click the button below to reset your password</center>"))
->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', ['token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset()], false)))
->line(Lang::getFromJson('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')]))
->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
}

reset_token_generator.php

public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPasswordNotification($token));
}

为什么这突然发生了

我在。env文件中找到了解决方案,我只是将我的网站名称替换为以下

app_name= websitename.comapp_name= www.websitename.com

我不知道是什么问题,但这一个为我工作

如果有人知道原因,我会很高兴知道

最新更新