【发布时间】:2016-07-14 11:49:00
【问题描述】:
使用 Laravel 5,我需要 2 种不同的密码重置电子邮件视图。电子邮件视图的默认路径是 emails.password。但在某些情况下,我想发送 emails.password_alternative。
我该怎么做? (来自 Laravel 的 PasswordBroker)
这是我当前的代码:
public function __construct(Guard $auth, PasswordBroker $passwords)
{
$this->auth = $auth;
$this->passwords = $passwords;
}
public function sendReset(PasswordResetRequest $request)
{
//HERE : If something, use another email view instead of the default one from the config file
$response = $this->passwords->sendResetLink($request->only('email'), function($m)
{
$m->subject($this->getEmailSubject());
});
}
【问题讨论】:
标签: php email laravel passwords