Skip to content
Permalink
Browse files

Default to null for invalid geoip queries #381

  • Loading branch information...
cydrobolt committed May 24, 2018
1 parent 1fb607b commit f9622d733b554154a39e9a716c5c134da35acba7
Showing with 12 additions and 11 deletions.
  1. +1 −0 app/Helpers/StatsHelper.php
  2. +11 −11 config/geoip.php
@@ -61,6 +61,7 @@ public function getCountryStats() {
->select(DB::raw("country AS label, count(*) AS clicks"))
->groupBy('country')
->orderBy('clicks', 'desc')
->whereNotNull('country')
->get();
return $stats;
@@ -126,18 +126,18 @@
'default_location' => [
'ip' => '127.0.0.0',
'iso_code' => 'US',
'country' => 'United States',
'city' => 'New Haven',
'state' => 'CT',
'state_name' => 'Connecticut',
'postal_code' => '06510',
'lat' => 41.31,
'lon' => -72.92,
'timezone' => 'America/New_York',
'continent' => 'NA',
'iso_code' => null,
'country' => null,
'city' => null,
'state' => null,
'state_name' => null,
'postal_code' => null,
'lat' => 0,
'lon' => 0,
'timezone' => 'UTC',
'continent' => null,
'default' => true,
'currency' => 'USD',
'currency' => null,
],
];

0 comments on commit f9622d7

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.