topoff / laravel-user-logger
Laravel 用户日志记录器
v6.2
2024-05-15 07:57 UTC
Requires
- php: ^8.0
- illuminate/cache: *
- illuminate/database: *
- illuminate/encryption: *
- illuminate/filesystem: *
- illuminate/hashing: *
- illuminate/log: *
- illuminate/support: *
- jaybizzle/crawler-detect: ^1.2
- jenssegers/agent: ^2.6
- matomo/device-detector: ^6.3.0
- snowplow/referer-parser: ~0.2
- topoff/user-agent-parser: ^v6.0
- ua-parser/uap-php: ^3.9
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.14
- phpunit/phpunit: ^10.0
- dev-master
- v6.2
- v6.1.0
- v5.7
- v5.5
- 5.4
- v5.3
- v5.2
- v5.1.2
- v5.1.1
- v5.1.0
- v5.0.2
- v4.0.0
- v3.0.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.1.0
- v1.0.1
- v0.16.2
- v0.16.1
- v0.16.0
- v0.15
- v0.14.0
- v0.13.1
- v0.13.0
- v0.12.0
- v0.11.1
- v0.11.0
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.7
- v0.6.6
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4
- v0.3
- v0.2
- v0.1
- v0.0.1
This package is auto-updated.
Last update: 2024-09-15 10:56:03 UTC
README
这是一个为 Laravel 设计的简单用户日志记录器和 A/B 测试工具。
要求
需要 Laravel 8
安装
目前,使用 composer 是安装此包的唯一支持方式。
composer require topoff/laravel-user-logger
入门
您可以使用以下命令发布和更改配置
php artisan vendor:publish
您需要在 config/database.php 中创建一个名为 user-logger 的连接
'user-logger' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => 'userlogger', 'username' => env('DB_USERNAME', ''), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ],
经验
要开始使用经验,进行 A/B 测试,请在配置文件中将 use_experiments 设置为 true 并定义至少两个实验,例如 a 和 b。
/* * use A/B Testing experiments */ 'use_experiments' => true, /* * active experiments - max 16 chars * crawlers will always run as in the first experiment, but will not be logged */ 'experiments' => [ 'a', 'b', ],
要开始一个新的实验,请使用以下命令刷新旧数据
php artisan user-logger:flush
更新
此包使用 https://github.com/snowplow-referer-parser/referer-parser。在那里您可以找到有关更新已知引用者列表的信息,这应该按顺序手动完成。