首页 > 解决方案 > 在 Laravel 中使用 HyN Multitenant 重置密码不起作用

问题描述

我与 HyN Multitenant 合作,问题是我需要恢复用户的密码才能发送占用默认带有 AUTH 的驱动程序的邮件。

主题是在恢复密码时它不起作用,它给我一个错误,它没有在数据库中找到表,但是,它不识别连接的租户,尝试添加他/她的特征但没有解决办法。

在 Config/Auth.php 中,我配置了连接,没有任何东西带我连接数据库,但不带租户。

'passwords' => [
    'users' => [
        'provider' => 'users',
        'table' => 'password_resets',
        'expire' => 60,
        'throttle' => 60,
        'connection' => 'system',
    ],
],

在此处输入图像描述

标签: laravelmulti-tenant

解决方案


你只需要设置:

'passwords' => [
    'users' => [
        'provider' => 'users',
        'table' => 'password_resets',
        'expire' => 60,
        'throttle' => 60,
        'connection' => 'tenant',
    ],
]

并且在ForgotPasswordController集合中use SendsPasswordResetEmails, UsesTenantConnection;


推荐阅读