$queryName = request('queryName');
$queryId = request('queryIdcode');
$queryLibid = request('queryLibid');
if (empty($queryName) && empty($queryId)) {
return [
'error' => 1,
'msg' => "请输入搜索条件",
];
}
$infos = new YBukonglibMgr;
$infos = $infos->where('id',$queryLibid);
$infos = $infos->whereHas('people', function ($query) use($queryName, $queryId) {
if(!empty($queryName)) {
$query = $query->where('name',$queryName);
}
if (!empty($queryId)) {
$query = $query->where('id_code',$queryId);
}
});
$view = 'library/control/result_querypeople';
3 .
GCT1015
喵喔喔
慕桂英3389331
繁星点点滴滴