$count=$this->hygl_model->with(['MemberInfo'=>function($query) use ($where2){
$query->where($where2)->select();
}])->where($where)->count();
$zblx_list = $this->hygl_model->with(['MemberInfo'=>function($query) use ($where2){
$query->where($where2)->select();
}])->where($where)->limit(($page-1)*$limit,$limit)->order(['id' => 'DESC'])->select();
怎么我这个闭包,where条件怎么没用?我看网上都是这样写的呀? 最佳答案
