Advertisement
Guest User

Untitled

a guest
Mar 26th, 2020
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.74 KB | None | 0 0
  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' => false,
  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' => 'ipdata_via_settings',
  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' => 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz',
  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.         'ipdata_via_settings' => [
  91.             'class'  => \App\Providers\IPDataProvider::class,
  92.             'secure' => true,
  93.         ],
  94.     ],
  95.  
  96.     /*
  97.     |--------------------------------------------------------------------------
  98.     | Default Cache Driver
  99.     |--------------------------------------------------------------------------
  100.     |
  101.     | Here you may specify the type of caching that should be used
  102.     | by the package.
  103.     |
  104.     | Options:
  105.     |
  106.     |  all  - All location are cached
  107.     |  some - Cache only the requesting user
  108.     |  none - Disable cached
  109.     |
  110.     */
  111.  
  112.     'cache' => 'all',
  113.  
  114.     /*
  115.     |--------------------------------------------------------------------------
  116.     | Cache Tags
  117.     |--------------------------------------------------------------------------
  118.     |
  119.     | Cache tags are not supported when using the file or database cache
  120.     | drivers in Laravel. This is done so that only locations can be cleared.
  121.     |
  122.     */
  123.  
  124.     'cache_tags' => [],
  125.  
  126.     /*
  127.     |--------------------------------------------------------------------------
  128.     | Cache Expiration
  129.     |--------------------------------------------------------------------------
  130.     |
  131.     | Define how long cached location are valid.
  132.     |
  133.     */
  134.  
  135.     'cache_expires' => 30,
  136.  
  137.     /*
  138.     |--------------------------------------------------------------------------
  139.     | Default Location
  140.     |--------------------------------------------------------------------------
  141.     |
  142.     | Return when a location is not found.
  143.     |
  144.     */
  145.  
  146.     'default_location' => [
  147.         'ip' => '127.0.0.0',
  148.         'iso_code' => '',
  149.         'country' => '',
  150.         'city' => '',
  151.         'state' => '',
  152.         'state_name' => '',
  153.         'postal_code' => '',
  154.         'lat' => 43.129374,
  155.         'lon' => 131.918884,
  156.         'timezone' => '',
  157.         'continent' => '',
  158.         'default' => true,
  159.         'currency' => '',
  160.     ],
  161. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement