$wamResult = WpAdsupplierMerchant::where('cate_id',$cateId)->field('merchant_id')->select();//所有门店ids
您好,想将所有的集合的id存到一个变量里,比如:$ids = [12,21,23,32,11];
现在$wamResult 的结果是:
[data:protected] => Array
(
[merchant_id] => 345
)
[origin:protected] => Array
(
[merchant_id] => 345
)
[relation:protected] => Array
(
)
现在的问题不知道怎么处理$wamResult,
是这样,比如:$ids = "12,21,23,32,11";