langleyfoxall / laravel-authentication-log
记录身份验证请求
0.2.0
2022-05-20 12:44 UTC
Requires (Dev)
- orchestra/testbench: ^7.5
- phpunit/phpunit: ^9.5
- dev-master
- 0.2.0
- v0.1
- dev-feature/select-any-guard-functionality
- dev-fix/merges-caused-failing-tests
- dev-refactors
- dev-feature/credential-encryption
- dev-feature/specifying-guards
- dev-fix/correctly-omit-fields
- dev-feature/store-register-users
- dev-feature/log-lockout-event
- dev-feature/log-password-reset-event
- dev-feature/updating-documentation
- dev-feature/store-ip-in-log
- dev-feature/writing-tests
- dev-feature/ammending-documentation
- dev-feature/using-subscribers
This package is auto-updated.
Last update: 2024-09-06 18:59:56 UTC
README
描述
一个用于监听各种Authenticatable事件并将它们记录到数据库中的包
安装
要安装,请在您的工作目录内的终端中输入以下内容
composer require langleyfoxall/laravel-authentication-log
安装完包后,运行迁移并确保在所有要记录的模型中使用HasAuthenticatable特性。
所有事件都记录在authentication_log_records表中。
配置
在auth-log.php
配置文件中,您可以指定要记录的内容。您可以取消注释以下内容来更改
- 要记录的事件,通过注释掉不需要的事件
- 不记录的凭据,通过在
credentialsToOmit
中添加字段 - 不记录的字段,通过在
fieldsToOmit
中添加字段 - 接受的守卫,通过在
acceptedGuards
中添加指定的守卫
命令
php artisan laravel-authentication-log:showlog
此命令将显示存储在身份验证日志记录表中的数据
功能
此包可以记录以下内容
- 成功的登录
- 失败的登录
- 成功的登出
- 密码重置
- 锁定
- 注册新用户
可以通过config/auth-log.php
配置这些功能。