Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect results with getCountry() #34

Closed
wrabit opened this issue Jun 21, 2020 · 3 comments
Closed

Incorrect results with getCountry() #34

wrabit opened this issue Jun 21, 2020 · 3 comments

Comments

@wrabit
Copy link

wrabit commented Jun 21, 2020

When I run the example code:

Geo::getCountry('GR')
	->level(Geo::LEVEL_3)
	->orderBy('population','DESC')
	->limit(3)
	->get();

I am getting: (same result no matter what I change the country to)

=> Illuminate\Database\Eloquent\Collection {#1987
     all: [
       Igaster\LaravelCities\Geo {#1986
         id: 1909729,
         parent_id: null,
         name: "Banan Qu",
         country: "CN",
         a1code: "33",
         level: "ADM3",
         population: 29914000,
         lat: "29.370790",
         long: "106.734560",
         timezone: "Asia/Shanghai",
       },
       Igaster\LaravelCities\Geo {#1985
         id: 2293537,
         parent_id: 11996449,
         name: "Departement d' Abidjan",
         country: "CI",
         a1code: "93",
         level: "ADM3",
         population: 4707404,
         lat: "5.416670",
         long: "-4.033330",
         timezone: "Africa/Abidjan",
       },
       Igaster\LaravelCities\Geo {#1984
         id: 2988506,
         parent_id: 2968815,
         name: "Paris",
         country: "FR",
         a1code: "11",
         level: "ADM3",
         population: 4380654,
         lat: "48.853390",
         long: "2.348640",
         timezone: "Europe/Paris",
       },
     ],
   }

Do you know why?

@wrabit
Copy link
Author

wrabit commented Jun 21, 2020

Update: works if I use Geo::country('GR')..

@wrabit wrabit closed this as completed Sep 29, 2020
@ronlinet
Copy link

ronlinet commented Dec 2, 2022

I have the same problem. Why is this closed? Shouldn't be the documentation updated?

@ronlinet
Copy link

ronlinet commented Dec 3, 2022

For those who run into this problem feel free to reuse the Geo collection from this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants