visitor.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Driver
  6. |--------------------------------------------------------------------------
  7. |
  8. | This value determines which of the following driver to use.
  9. | You can switch to a different driver at runtime.
  10. |
  11. */
  12. 'default' => 'jenssegers',
  13. // except save request or route names
  14. 'except' => ['login', 'register'],
  15. // name of the table which visit records should save in
  16. 'table_name' => 'visits',
  17. /*
  18. |--------------------------------------------------------------------------
  19. | List of Drivers
  20. |--------------------------------------------------------------------------
  21. |
  22. | This is the array of Classes that maps to Drivers above.
  23. | You can create your own driver if you like and add the
  24. | config in the drivers array and the class to use for
  25. | here with the same name. You will have to implement
  26. | Shetabit\Visitor\Contracts\UserAgentParser in your driver.
  27. |
  28. */
  29. 'drivers' => [
  30. 'jenssegers' => \Shetabit\Visitor\Drivers\JenssegersAgent::class,
  31. 'UAParser' => \Shetabit\Visitor\Drivers\UAParser::class,
  32. ],
  33. /*
  34. |--------------------------------------------------------------------------
  35. | GeoIP Enrichment
  36. |--------------------------------------------------------------------------
  37. |
  38. | When enabled, visits can be enriched with geolocation data stored
  39. | in the "geo_raw" JSON column. This package ships with a default
  40. | resolver (stevebauman/location). You may implement your own by
  41. | adding it to the drivers array below. Each driver must implement
  42. | Shetabit\Visitor\Contracts\GeoIpResolver.
  43. |
  44. */
  45. 'geoip' => false, // disable enrichment by default
  46. 'resolver' => 'stevebauman', // default resolver
  47. 'resolvers' => [
  48. 'stevebauman' => \Shetabit\Visitor\Resolvers\GeoIp\SteveBaumanResolver::class,
  49. 'null' => \Shetabit\Visitor\Resolvers\GeoIp\NullResolver::class,
  50. ],
  51. ];