如何添加 IN 带背包的拉威尔条款?这就是我要找的:
IN
$this->crud->addClause('where', 'customer_id', 'in', [1,3,5,6,7]);`
应该转化成这样:
select * from customer where customer_id in (1,3,5,6,7);
a7qyws3x1#
选择*from customer where(customer\u id,$array);
ukxgm1gy2#
只是使用 whereIn 而不是 where , backpack-for-laravel 准备好了:
whereIn
where
backpack-for-laravel
$this->crud->addClause('whereIn', 'customer_id', [1,3,5,6,7]);
2条答案
按热度按时间a7qyws3x1#
选择*from customer where(customer\u id,$array);
ukxgm1gy2#
只是使用
whereIn
而不是where
,backpack-for-laravel
准备好了: