Search code examples
laravelforgot-passwordpassword-recovery

Laravel 5.1 password reset email subject line


Is it possible to change the default subject of password reset email in Laravel 5.1? without editing the ResetsPasswords trait?, if yes, please explain.


Solution

  • I have find out the answer. We really don't need to override the ResetsPasswords trait. We can just add the subject line to the constructor of the PasswordController class: in

    app\Http\Controllers\Auth\PasswordController
    

    in _construct function

     public function __construct()
    {
        $this->middleware('guest');
        $this->subject = 'New Password Request'; // <-Password Reset Email Subject
    }
    

    Save and upload the file. That's it.