You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL 查询中有一种 in 多列特殊查询类型,大概是这个样子 select * from order where (id,buyer) in(( 1, '张三' ),( 2, '李四' )) and order.deleted_at is null。laravel 的查询构建器并没有直接支持该类型的查询。我这边通过查询构建器 Macroable 新增了一个 whereIns 查询方法方便该类型的查询。
laravel 中 in 多列特殊查询类型解决方案
使用示例
新建 QueryBuilderMacro
AppServiceProvider 中注册
QueryBuilderMacro
即可原文链接
The text was updated successfully, but these errors were encountered: