configProvince = $configProvince; } //省市区列表 public function index($request) { $perPage = isset($request['per_page']) ? $request['per_page'] : env('PER_PAGE'); $where = []; if(isset($request['id'])){ $where[] = ['bjcity_id', '=', $request['bjcity_id']]; } return $this->configProvince->where($where)->orderBy('bjcity_id', 'asc')->paginate($perPage); } }