mercredi 30 décembre 2015

laravel5.1 edit sendResetLink() function

How did I need to edit this code:

$response = Password::sendResetLink($request->only('username'),     function (Message $message) {
        $message->subject($this->getEmailSubject());
        $message->from('hello@app.com', 'Your ApplicationZ');
    });

So I can use this e-mail template:

Hey {{ $username }}
Click here to reset your password: {{ url('reset/'.$token) }}

The difference to the default function is to use the username to say a nice hello to the user. I don't want to rewrite the whole password "reset" method.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire