Download the PHP package mohit-hasan/laravel-activity-logger without Composer
On this page you can find all versions of the php package mohit-hasan/laravel-activity-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mohit-hasan/laravel-activity-logger
More information about mohit-hasan/laravel-activity-logger
Files in mohit-hasan/laravel-activity-logger
Package laravel-activity-logger
Short Description A reusable Laravel package to automatically track and log user actions across the app.
License MIT
Informations about the package laravel-activity-logger
Laravel Activity Logger
A Laravel package that automatically logs Eloquent model events (create/update/delete) and supports manual logging with metadata, polymorphic relationships, and auto-capture of user/IP/user agent.
Live Demo: https://activity-logger.mohithasan.com
Run Demo Locally
Visit http://localhost:8000. Use the buttons to test: Manual Log, Create Post, Update Post, Delete Post. All entries appear in the table with action, description, model link, user, IP, metadata, and timestamp.
Install in Your App
Auto-discovers service provider and facade — no manual registration needed.
Usage
Trait — Auto-log model events
Every created, updated, deleted on Post is logged automatically.
Facade — Manual logging
With metadata
Link to a model (polymorphic)
Retrieve logs
All methods chain: action() → description() → on() → with() → by() → log(). Returns null silently on failure — never throws.
Fluent API (full chain)
All methods chain. Returns null silently on failure — never throws.
Config (config/activity-logger.php)
| Key | Default | Description |
|---|---|---|
table_name |
activity_logs |
DB table name |
user_model |
App\Models\User |
User model class |
capture_fields |
['ip_address' => true, 'user_agent' => true] |
Auto-capture toggles |
ignore_events |
['retrieved'] |
Events to skip |
log_events |
['created', 'updated', 'deleted', 'restored'] |
Events to track |
All versions of laravel-activity-logger with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0