在laravel 5.1中,我有一个密码提示,我想用几种语言发送消息。所以我想在emailResetLink方法中更改$ view,但是我不知道如何。下面是方法。
public function emailResetLink(CanResetPasswordContract $user, $token, Closure $callback = null)
{
// We will use the reminder view that was given to the broker to display the
// password reminder e-mail. We'll pass a "token" variable into the views
// so that it may be displayed for an user to click for password reset.
$view = $this->emailView;
return $this->mailer->send($view, compact('token', 'user'), function ($m) use ($user, $token, $callback) {
$m->to($user->getEmailForPasswordReset());
if (! is_null($callback)) {
call_user_func($callback, $m, $user, $token);
}
});
}
我尝试更改$ view = $ this-> emailView;到
$view = view('emails.auth.de.reminder', ['token' => $token])->render();
但是此解决方案给我错误“无效的参数异常”