尝试通过邮件向用户重新发送登录详细信息。我想要做的是在用户点击忘记密码链接后,会显示一个表单,要求发送电子邮件。电子邮件发布后,我检查电子邮件是否与users表中的电子邮件相对应并发送详细信息。
这是我的控制器:
public function postResendPassword()
{
$posted = Input::get();
$email = $posted['email'];
$user = User::where('email', '=', $email)->first();
$user_password= $user->password_confirmation;
$user_username = $user->username;
$user_email = $user->email;
$to = $user->email;
$subject = " login details request";
$message =
<h3>login details</h3>
email : $user_email
login password : $user_password
regards;
mail($to, $subject, $message);
}
如何解决此问题并修复此错误