laravel 数组查询支持1=2写法
有时候我们查询 需要数组查询,某一个条件需要返回数据为空的,正常 where('1=2')
就行了,数组没见过,经过实验下面写法可以。
Model::where([[DB::raw('1'), '=', 2]]
推荐文章: