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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+93-3Lines changed: 93 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,101 @@ Will return the following string to the `index` view:
56
56
"The IP address 127.0.0.1"
57
57
```
58
58
59
+
Mais par défaut cet object `$geolocation` est une instance de la classe `\Laravelcm\AbstractIpGeolocation\DataObject\GeolocationData` qui donne toutes les valeurs transformées de l'API (tableau) en objet PHP.
60
+
Les informations sont stockées par défaut dans la session depuis le middleware, ce qui vous permet d'avoir accès aux informations n'importe où dans votre code.
61
+
62
+
Voici le contenu de l'objet `$geolocation` apres un dump:
Config file are located at `config/abstract-ip-geolocation.php` after publishing provider element.
113
+
114
+
#### Fields
115
+
By default, all fields are returned by the Abstract API, but you can choose to retrieve just the values you're interested in from the API.
116
+
To do this, you need to specify the fields you want (the list of fields is available here https://docs.abstractapi.com/ip-geolocation#request-parameters).
$currency = $geolocation->currency // instance of \Laravelcm\AbstractIpGeolocation\DataObject\Currency
143
+
```
144
+
145
+
#### DTO
146
+
The available DTO classes are listed below. In the json return from the Abstract Geolocation API, all objects are represented by DTO classes
61
147
62
-
### Test
63
-
wip..
148
+
-`\Laravelcm\AbstractIpGeolocation\DataObject\GeolocationData` which represents the geolocation class containing all information relating to the user via its IP address
149
+
-`\Laravelcm\AbstractIpGeolocation\DataObject\Connection` which represents the DTO class for its connection origin information
150
+
-`\Laravelcm\AbstractIpGeolocation\DataObject\Currency` which represents the DTO class for the currency
151
+
-`\Laravelcm\AbstractIpGeolocation\DataObject\Flag` which represents the DTO class for country flag information
152
+
-`\Laravelcm\AbstractIpGeolocation\DataObject\Timezone` which represents the DTO class for Timezone information
153
+
-`\Laravelcm\AbstractIpGeolocation\DataObject\Security` which represents the DTO class for security information, lets you know whether the user is using a VPN or not
0 commit comments