Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @property string|null $timezone
* @property string|null $continent
* @property string|null $currency
* @property object|null $raw
* @property bool $default
* @property bool $cached
*
Expand Down
3 changes: 2 additions & 1 deletion src/Services/IPApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function boot()
'User-Agent' => 'Laravel-GeoIP',
],
'query' => [
'fields' => 49663,
'fields' => $this->config('fields', 49663),
'lang' => $this->config('lang', ['en']),
],
];
Expand Down Expand Up @@ -87,6 +87,7 @@ public function locate($ip)
'lon' => $json->lon,
'timezone' => $json->timezone,
'continent' => $this->getContinent($json->countryCode),
'raw' => $json,
]);
}

Expand Down
1 change: 1 addition & 0 deletions src/Services/IPData.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function locate($ip)
'timezone' => Arr::get($json, 'time_zone.name'),
'continent' => Arr::get($json, 'continent_code'),
'currency' => Arr::get($json, 'currency.code'),
'raw' => $json,
]);
}
}
1 change: 1 addition & 0 deletions src/Services/MaxMindDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function locate($ip)
'lon' => $record->location->longitude,
'timezone' => $record->location->timeZone,
'continent' => $record->continent->code,
'raw' => $record,
]);
}

Expand Down
1 change: 1 addition & 0 deletions src/Services/MaxMindWebService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function locate($ip)
'lon' => $record->location->longitude,
'timezone' => $record->location->timeZone,
'continent' => $record->continent->code,
'raw' => $record,
]);
}
}