I struggled with the same. I added the setEmailView () method to my custom PasswordBroker and called it before sending resetlink to AuthController, but this violated the normal reset password function.
So, I completely abandoned this and went for a much simpler approach. In AuthController.php, enter the variable in the password pattern.
view()->composer('auth.emails.password', function($view) { $view->with(['register'=>true]); }); Password::sendResetLink(['email'=>$data['email']], function($message) { $message->subject('Registration Email'); });
Then in the template auth / emails / password.blade.php
@if ( isset($register) ) Whatever you want to say in registration Email. @else Normal password reset Email here. @endif
Gsherman
source share