where('user_id',15)->pluck('store_id')->toArray(); $res = Store::query()->with('shoppingCart')->whereIn('id',$storeIds) ->get(); return $res; } public function check($goodsId) { return mt_rand(0,6); } public function undo() { $storeIds = Db::table('lanzu_shopping_cart')->where('user_id',198)->pluck('store_id')->toArray(); $res = Store::query()->with('shoppingCart')->whereIn('id',$storeIds) ->get(); return $res; } public function countGoods() { return mt_rand(1,100); } }