【发布时间】:2020-02-03 10:58:45
【问题描述】:
我的这个逻辑查询不起作用,因为我需要像 4 个不同的表一样加入,这很疯狂,但请帮助我,我会在未来找到更好的方法。
select * from approvals
where approvable_type =
(select model from permission_configs
where variable = (
select permission_slug from role_permission
where role_id = (
select role_id from role_user
where user_id = approvals.user_id) ) )
请在 Eloquent 中使用多重连接给我上述查询!我将永远感激你。
【问题讨论】: