【发布时间】:2021-12-20 18:07:50
【问题描述】:
有没有办法在pivot table 内的pivot table 的一个表上添加where 子句?例如在下面的代码中,如何在products_categories 中添加where 子句来指定products 和type='ELECTRONICS'?
DB::table("products_categories")
->whereIn("category_id", array_values($ids))
->pluck("id")
->all();
【问题讨论】:
标签: laravel