laravel - 在 Laravel 中使用 HyN Multitenant 重置密码不起作用
问题描述
我与 HyN Multitenant 合作,问题是我需要恢复用户的密码才能发送占用默认带有 AUTH 的驱动程序的邮件。
主题是在恢复密码时它不起作用,它给我一个错误,它没有在数据库中找到表,但是,它不识别连接的租户,尝试添加他/她的特征但没有解决办法。
在 Config/Auth.php 中,我配置了连接,没有任何东西带我连接数据库,但不带租户。
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
'connection' => 'system',
],
],
解决方案
你只需要设置:
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
'connection' => 'tenant',
],
]
并且在ForgotPasswordController
集合中use SendsPasswordResetEmails, UsesTenantConnection;
推荐阅读
- entity-attribute-value - 保管 EAV 的最佳实践
- ethereum - 来自以太坊网站的 ERC20 代币代码
- apache - 网站是否需要为使用 SSL 的反向代理打开端口 443
- ecmascript-6 - setTimeout 使用 async-await 关键字,但不知道它是如何工作的
- excel - 动态搜索工作表并添加单元格的 VBA 代码
- node.js - 无论如何要使用 Multer 解压缩上传到内存中的文件?
- python - 如何在 python 的模块中加载文本文件?
- sql - 让两个 SQLite 数据库相互引用
- ms-access - MS Access SQL“喜欢”和通配符仅返回完全匹配
- html - “Hello Word” (html) 网站在专用服务器中?