How to send the password reset link via email using queue in laravel 5

后端 未结 3 987
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 14:15

I am using the ResetsPasswords trait by laravel to implement password reset. What I would like to achieve is to send the email using queue. Digging through the code I found

3条回答
  •  甜味超标
    2020-12-16 14:46

    In case you get "Call to a member function onQueue() on null" after trying to specify queue fakemeta's solution just specify the the queue you are targeting in the constructor of your class.

    queue = "authentication";
        }
    }
    

    then use the notification facade to send your mail in the overriding method. The notify method also works

    notify(new ResetPasswordNotification($token));
            \Notification::send($this, new ResetPasswordNotification($token));
        }
    }
    

提交回复
热议问题