Download the PHP package label84/laravel-auth-log without Composer
On this page you can find all versions of the php package label84/laravel-auth-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download label84/laravel-auth-log
More information about label84/laravel-auth-log
Files in label84/laravel-auth-log
Package laravel-auth-log
Short Description Log user authentication actions in Laravel.
License MIT
Informations about the package laravel-auth-log
Laravel Auth Log
The laravel-auth-log
package will log all the default Laravel authentication events (Login, Attempting, Lockout, etc.) to your database. In the config file you can select the events that you would like to log. It will save the event name, email, user id, ip address and user agent to the database. No other configurations are required. This package could be useful for tracking unwanted activity in your Laravel application.
- Laravel Support
- Installation
- Usage
- Tests
- License
Laravel Support
Version | Release |
---|---|
11.x | ^1.3 |
10.x | ^1.2 |
Installation
1. Install the package via composer
2. Publish the config file and migration
3. Run migration
Usage
In the config file config/authlog.php
you can (un)comment the events that you'd like to log to your database.
In the same file you can can also change the database connection and table name.
Enable/disable logging
You can add the AUTH_LOG_ENABLED=
to your .env
file to enable/disable the logging.
Table format example
id | event_name | user_id | ip_address | user_agent | context | created_at | |
---|---|---|---|---|---|---|---|
1 | Attempting | [email protected] | 127.0.0.1 | Mozilla/5.0 (Windows NT 10.0... | 2022-01-10 00:00:00 | ||
2 | Login | 1 | 127.0.0.1 | Mozilla/5.0 (Windows NT 10.0... | 2022-01-10 00:00:00 |
Tests
License
All versions of laravel-auth-log with dependencies
illuminate/support Version ^10.0|^11.0
illuminate/auth Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0