$wh_id ='指定的值';
$data =Goods::select('*',\DB::raw("$wh_id as wh_id"))->where(['goods_id'=>$request->get('goods_id')])
->with(['goods_group_info'=>function($query){
$query->select('*',\DB::raw('goods_id use_total'));
return $query;
}])->get();
网友评论