@@ -43,9 +43,9 @@ To find out more simple open the `config/geoip.php` file.
4343
4444### Service Configuration
4545
46- To simplify and keep things clean, all third party composer packages, that are needed for a service, are installed separately.
46+ To simplify and keep things clean, all third party composer packages, which are needed for a service, are installed separately.
4747
48- For further configuration options checkout the services page.
48+ For further configuration options, checkout the [ services page] ( ./docs/services.md ) .
4949
5050
5151### Caching Configuration
@@ -54,9 +54,9 @@ GeoIP uses Laravel’s default caching to store queried IP locations.
5454This is done to reduce the number of calls made to the selected service, as some of them are rate limited.
5555
5656Options:
57- - ` all ` all location are cached
57+ - ` all ` all locations are cached
5858 - ` some ` cache only the requesting user
59- - ` none ` caching is completely disable
59+ - ` none ` caching is completely disabled
6060
6161
6262## Usage
@@ -70,36 +70,37 @@ geoip()->getLocation('27.974.399.65'); // Get the location from the provided IP.
7070geoip()->getClientIP(); // Will return the user IP address.
7171```
7272
73- Example of Location object:
73+ Example of a ` Location ` object:
7474``` php
75- \InteractionDesignFoundation\GeoIP\Location {
76- [
77- 'ip' => '1.1.1.1',
78- 'iso_code' => 'US',
79- 'country' => 'United States',
80- 'city' => 'New Haven',
81- 'state' => 'CT',
82- 'state_name' => 'Connecticut',
83- 'postal_code' => '06510',
84- 'lat' => 41.28,
85- 'lon' => -72.88,
86- 'timezone' => 'America/New_York',
87- 'continent' => 'NA',
88- 'currency' => 'USD',
89- 'default' => false,
90- ]
91- }
75+ \InteractionDesignFoundation\GeoIP\Location {[
76+ 'ip' => '1.1.1.1',
77+ 'iso_code' => 'US',
78+ 'country' => 'United States',
79+ 'city' => 'New Haven',
80+ 'state' => 'CT',
81+ 'state_name' => 'Connecticut',
82+ 'postal_code' => '06510',
83+ 'lat' => 41.28,
84+ 'lon' => -72.88,
85+ 'timezone' => 'America/New_York',
86+ 'continent' => 'NA',
87+ 'currency' => 'USD',
88+ 'default' => false,
89+ ]}
9290```
9391
94- ` Location ` class implements ` \ArrayAccess ` interface, means you can access properties of the ` Location ` object using array access syntax :
92+ ` Location ` class implements ` \ArrayAccess ` interface, means you can access properties of the ` Location ` object using both object and array access:
9593``` php
9694$location = geoip()->getLocation();
95+
96+ $city = $location->city;
97+ // The same as:
9798$city = $location['city'];
9899```
99100
100101### Artisan
101102
102- Some services require downloading and use local database to detect Location by IP address.
103+ Some services require downloading and use a local database to detect Location by IP address.
103104There is a console command to download/update database:
104105``` sh
105106php artisan geoip:update
0 commit comments