Change email view path for password reset on Laravel

Viewed 5109

Using Laravel 5, I need 2 different views for password reset email. The default path to the email view is emails.password. But upon some conditions, I want to send emails.password_alternative.

How can I do this? (with PasswordBroker from Laravel)

This is my current code:

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());
    });
}
2 Answers
Related