此查询正在运行
$conditions = [
'status' => '1',
'country' => "DK"
];
$offers = Offers::where($conditions)->get();
我该如何在其中使用LIKE %%
当我在单一条件下尝试此操作时,它的工作原理
$offers = Offers::where('country' , 'LIKE' , '%DK%')->get();
你有尝试过吗?
$conditions = [
'status' => '1',
'country' => "DK"
];
$offers = Offers::where('country' , 'LIKE' , '%DK%')->where($conditions)->get();
您可以根据需要随意链接where子句。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句