在后台管理中我将uid重新赋值为user表中的userName 展示为中文名字
$list = Db::table('order')->order('id')->paginate(15)->each(function($item, $key){
$user = Db::table('user')->where('id='.$item['uid'])->find();
$goods = Db::table('goods')->where('id='.$item['goodsId'])->find();
$item['uid'] = $user['userName'];
$item['goodsId'] = $goods['goodsName'];
return $item;
});
现在我想通过模糊搜索人名 达到搜索订单的效果怎么弄?
最佳答案