我在Laravel中使用自定义密码重置功能。Laravel version 5.8我按照这个文档 https://laravel.com/docs/5.8/passwords#password-customization 还添加了自定义防护,我在这里检查了 https://laravel.com/docs/5.8/authentication#adding-custom-guards我不知道我在下面的这些设置中做错了什么。<?phpreturn [ /* |-------------------------------------------------------------------------- | Authentication Defaults |-------------------------------------------------------------------------- | | This option controls the default authentication "guard" and password | reset options for your application. You may change these defaults | as required, but they're a perfect start for most applications. | */ 'defaults' => [ 'guard' => 'web', 'passwords' => 'users', ], /* |-------------------------------------------------------------------------- | Authentication Guards |-------------------------------------------------------------------------- | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you | here which uses session storage and the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | Supported: "session", "token" | */ 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'customers' => [ 'driver' => 'session', 'provider' => 'customers', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', 'hash' => false, ], ],
1 回答
白衣染霜花
TA贡献1796条经验 获得超10个赞
回复我自己,我找到了一个解决方案,我深入研究了这个问题几个小时,在Laravel 5.8中你需要
public function routeNotificationForMail($notification)
{
return $this->login_email;
}
如果您使用的是电子邮件列的名称,而不是电子邮件。
https://laravel.com/docs/5.8/notifications#customizing-the-recipient
- 1 回答
- 0 关注
- 66 浏览
添加回答
举报
0/150
提交
取消