我正在尝试在 Lumen 5.3 中创建 PasswordReset API。
我从默认的 Laravel 5.3 应用程序中进行了相同的设置。
$app->post('/password/email', 'PasswordController@postEmail');
$app->post('/password/reset/{token}', 'PasswordController@postReset');
在用户模型中,我重写了该方法,如下所示:
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPasswordNotification($token));
}
我已经手动拉入 Lumen 5.3 的通知包
但是,我收到以下错误:
BindingResolutionException in Container.php line 763:
Target [Illuminate\Contracts\Mail\Mailer] is not instantiable while building [Illuminate\Notifications\Channels\MailChannel].
我在这里想念什么?