使用模型的select查询的结果集
用json方法return返回提示如下

代码
public function getServerList(){
$province = model('Province')::all(['status' => 1]);
foreach ($province as &$value){
$value['list'] = $this
->where(['provinceId' => $value['id'] ,'use' =>1])
->select();
}
return $province;
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
$province 打印时数组不