Download the PHP package mrunknown0001/laravel-login-monitor without Composer
On this page you can find all versions of the php package mrunknown0001/laravel-login-monitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrunknown0001/laravel-login-monitor
More information about mrunknown0001/laravel-login-monitor
Files in mrunknown0001/laravel-login-monitor
Package laravel-login-monitor
Short Description Laravel package for monitoring login activities and sending beacons to a monitoring host
License MIT
Informations about the package laravel-login-monitor
Laravel Login Monitor
A simple Laravel package to monitor login activities and database mutations, sending beacons to a designated monitoring host.
Features
- 🔐 Automatic tracking of login successes, failures, and logouts
- 🗃️ Observes create, update, and delete operations across Eloquent models and raw/query builder mutations
- 📡 Sends beacons to your monitoring host via HTTP
- 🧠 Enriches each beacon with contextual metadata (acting user, request details, table names, record identifiers)
- 🌐 Captures IP address, user agent, full URL, HTTP method, and timestamps
- ⚙️ Configurable and easy to set up
- 🚀 Non-blocking async requests
Installation
Install via Composer:
Configuration
Publish the configuration file:
Add to your .env file:
Usage
The package automatically tracks authentication events and database mutations (create, update, delete) initiated through Eloquent models or the query builder. No additional instrumentation is required.
Manual Beacon Sending
Events Captured
| Event | Triggered when | Meta payload highlights |
|---|---|---|
login_success |
A user successfully authenticates | user_id, email, request context (IP, UA, HTTP method, URL) |
login_failed |
An authentication attempt fails | email, request context |
logout |
A user logs out | user_id, request context |
record_created |
A record is inserted via Eloquent or the query builder | table, record_id, attributes, actor + request context |
record_updated |
A record is updated via Eloquent or the query builder | table, record_id, changes, original, actor + request context |
record_delete |
A record is deleted via Eloquent or the query builder | table, record_id, original, actor + request context |
Note: Query builder mutations are automatically detected while avoiding duplicate beacons for Eloquent operations.
Example: Manual Mutation Recording
Beacon Format
All beacons are POSTed to /api/login-monitor with the following base structure:
event: The event name (e.g.,login_success,record_updated)meta: Contextual payload gathered for the eventapp_name,app_url,timestamp: Automatic application metadata
Example: Login Success
Example: Record Update
Requirements
- PHP 8.1 or higher
- Laravel 9.x, 10.x, 11.x, 12.x
License
MIT License
All versions of laravel-login-monitor with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
illuminate/queue Version ^9.0|^10.0|^11.0|^12.0