1+ <?php
2+
3+ return [
4+
5+ /*
6+ |--------------------------------------------------------------------------
7+ | Logging Configuration
8+ |--------------------------------------------------------------------------
9+ |
10+ | Here you may configure the log settings for when a location is not found
11+ | for the IP provided.
12+ |
13+ */
14+
15+ 'log_failures ' => true ,
16+
17+ /*
18+ |--------------------------------------------------------------------------
19+ | Include Currency in Results
20+ |--------------------------------------------------------------------------
21+ |
22+ | When enabled the system will do it's best in deciding the user's currency
23+ | by matching their ISO code to a preset list of currencies.
24+ |
25+ */
26+
27+ 'include_currency ' => true ,
28+
29+ /*
30+ |--------------------------------------------------------------------------
31+ | Default Service
32+ |--------------------------------------------------------------------------
33+ |
34+ | Here you may specify the default storage driver that should be used
35+ | by the framework.
36+ |
37+ | Supported: "maxmind_database", "maxmind_api", "ipapi"
38+ |
39+ */
40+
41+ 'service ' => 'ipapi ' ,
42+
43+ /*
44+ |--------------------------------------------------------------------------
45+ | Storage Specific Configuration
46+ |--------------------------------------------------------------------------
47+ |
48+ | Here you may configure as many storage drivers as you wish.
49+ |
50+ */
51+
52+ 'services ' => [
53+
54+ 'maxmind_database ' => [
55+ 'class ' => \Torann \GeoIP \Services \MaxMindDatabase::class,
56+ 'database_path ' => storage_path ('app/geoip.mmdb ' ),
57+ 'update_url ' => sprintf ('https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=%s&suffix=tar.gz ' , env ('MAXMIND_LICENSE_KEY ' )),
58+ 'locales ' => ['en ' ],
59+ ],
60+
61+ 'maxmind_api ' => [
62+ 'class ' => \Torann \GeoIP \Services \MaxMindWebService::class,
63+ 'user_id ' => env ('MAXMIND_USER_ID ' ),
64+ 'license_key ' => env ('MAXMIND_LICENSE_KEY ' ),
65+ 'locales ' => ['en ' ],
66+ ],
67+
68+ 'ipapi ' => [
69+ 'class ' => \Torann \GeoIP \Services \IPApi::class,
70+ 'secure ' => true ,
71+ 'key ' => env ('IPAPI_KEY ' ),
72+ 'continent_path ' => storage_path ('app/continents.json ' ),
73+ 'lang ' => 'en ' ,
74+ ],
75+
76+ 'ipgeolocation ' => [
77+ 'class ' => \Torann \GeoIP \Services \IPGeoLocation::class,
78+ 'secure ' => true ,
79+ 'key ' => env ('IPGEOLOCATION_KEY ' ),
80+ 'continent_path ' => storage_path ('app/continents.json ' ),
81+ 'lang ' => 'en ' ,
82+ ],
83+
84+ 'ipdata ' => [
85+ 'class ' => \Torann \GeoIP \Services \IPData::class,
86+ 'key ' => env ('IPDATA_API_KEY ' ),
87+ 'secure ' => true ,
88+ ],
89+
90+ 'ipfinder ' => [
91+ 'class ' => \Torann \GeoIP \Services \IPFinder::class,
92+ 'key ' => env ('IPFINDER_API_KEY ' ),
93+ 'secure ' => true ,
94+ 'locales ' => ['en ' ],
95+ ],
96+
97+ ],
98+
99+ /*
100+ |--------------------------------------------------------------------------
101+ | Default Cache Driver
102+ |--------------------------------------------------------------------------
103+ |
104+ | Here you may specify the type of caching that should be used
105+ | by the package.
106+ |
107+ | Options:
108+ |
109+ | all - All location are cached
110+ | some - Cache only the requesting user
111+ | none - Disable cached
112+ |
113+ */
114+
115+ 'cache ' => 'all ' ,
116+
117+ /*
118+ |--------------------------------------------------------------------------
119+ | Cache Tags
120+ |--------------------------------------------------------------------------
121+ |
122+ | Cache tags are not supported when using the file or database cache
123+ | drivers in Laravel. This is done so that only locations can be cleared.
124+ |
125+ */
126+
127+ 'cache_tags ' => env ('CACHE_DRIVER ' , 'array ' ) === "file " ? false : ['torann-geoip-location ' ],
128+
129+ /*
130+ |--------------------------------------------------------------------------
131+ | Cache Expiration
132+ |--------------------------------------------------------------------------
133+ |
134+ | Define how long cached location are valid.
135+ |
136+ */
137+
138+ 'cache_expires ' => 30 ,
139+
140+ /*
141+ |--------------------------------------------------------------------------
142+ | Default Location
143+ |--------------------------------------------------------------------------
144+ |
145+ | Return when a location is not found.
146+ |
147+ */
148+
149+ 'default_location ' => [
150+ 'ip ' => '127.0.0.0 ' ,
151+ 'iso_code ' => 'US ' ,
152+ 'country ' => 'Personal Computer ' ,
153+ 'city ' => 'Localhost ' ,
154+ 'state ' => 'DEV ' ,
155+ 'state_name ' => 'Connecticut ' ,
156+ 'postal_code ' => '06510 ' ,
157+ 'lat ' => 41.31 ,
158+ 'lon ' => -72.92 ,
159+ 'timezone ' => 'America/New_York ' ,
160+ 'continent ' => 'NA ' ,
161+ 'default ' => true ,
162+ 'currency ' => 'USD ' ,
163+ ],
164+
165+ ];
0 commit comments