Laravel租赁子域在中央数据库中构成auth
我正在使用 stancl/租赁
库。
我有一个中央域(example.com)和一个租户子域(tenant.example.com)。
问题在于,租户子域中的登录试图通过中央数据库进行验证。我有:
dd(tenant()); // this shows the right tenant
Auth::attempt($credentials_array); // this tries to auth in central database
我已经几天检查配置了,一切似乎都很好。我对我会想念什么的想法吗?
谢谢你!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
固定的!几乎总是发生,最大的问题来自最愚蠢的地方。
在某个时候,有人将ENV变量redis_client从
phpredis
更新为predis
。我必须在
.env
中设置redis_client = phpredis
。刷新缓存“ etvoilà!”。
我希望将来对某人有所帮助。
Fixed! As almost always happens, the biggest problems comes from the dumbest places.
At some point someone updated the env variable REDIS_CLIENT from
phpredis
topredis
.I had to set
REDIS_CLIENT=phpredis
in the.env
.refresh cache "et voilà!".
I hope this helps someone in the future.
我知道这与我的情况不同,但是我只是在这里为其他人呆了几乎一天,因为我使用了高个子预设,并且有Livewire,请确保您添加了LiveWire的特定更改 https://tenancyforlaravel.com/docs/docs/v3/integrations/livewire
而且不要忘记添加
i know it different case than mine , but I'm just puting this here for other people as I spent almost a day for it , because I used the tall presets , and there was livewire , make sure you add livewire specific changes https://tenancyforlaravel.com/docs/v3/integrations/livewire
and don't forget to add