我在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 關注
- 78 瀏覽
添加回答
舉報
0/150
提交
取消