In my website firstly it was working and suddenly yesterday i got this bug where steps are as follows
but clicking hitting that link used to get redirected to home page of the website with following 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));
}
why is this happening all of a sudden
i got the solution in .env file i just replace my website name with following
app_name= websitename.com
to app_name= www.websitename.com
i didn't get what was the issue but this one worked for me
if someone knows the reason i will be glad to know that