我对Laravel 7口才有意见。我有两个由many to many relation连接的桌子。表用户通过PaymentModule表PaymentModuleUser连接到pivot。当我在模型中使用toSQL()时,SQL会返回很好的结果,但是当我在Controller中检查雄辩的查询时,我会忽略我的wherePivot方法(从表中返回所有数据,忽略is_active = 1字段订阅者withPivot('is_active');MyController:
$users = User::with([&