select('province','city','district')->get()->toArray(); $arr=[]; if(!empty($allowarea)){ foreach($allowarea as $key=>$value){ $arr[]=$value['province']; $arr[]=$value['city']; $arr[]=$value['district']; } } return showJson(101, 1001, [ 'list' => Area::wherePid($id)->whereIn('id',$arr)->select(['id', 'name', 'code'])->get() ]); } public function allareas($id) { return showJson(101, 1001, [ 'list' => Area::wherePid($id)->select(['id', 'name', 'code'])->get() ]); } }