Laravel Audit Trail Package - Activity LoggerLaravel Audit Trail Package - Activity Logger
Full audit trail for Laravel apps. Logs every user action with filters by user, action, and date. Auto-log middleware included. Recently UpdatedLaravel Audit Trail Package - Activity Logger
Full audit trail for Laravel apps. Logs every user action with filters by user, action, and date....
Overview
Add a complete audit trail to any Laravel application in minutes. Track every action your users take — who did what, when, and to which record — with zero boilerplate.
What's included:
- ActivityLogger service class — log any action with a single method call
- ActivityLog Eloquent model with relationships
- AuditLogController with filtering by action type, user, and date range
- Optional auto-log middleware — automatically records every authenticated request
- Indexed migration optimized for performance at scale
Why this stands out:
Unlike generic logging packages, this gives you a ready-to-use controller and filterable API out of the box. No configuration headaches.
Use cases:
- Admin panels that need full user activity history
- Financial or healthcare apps requiring compliance logs
- SaaS platforms tracking feature usage per user
- Debugging production issues by replaying user actions
Drop in, run the migration, register the middleware (optional), and you have a working audit log in under 10 minutes.
Features
- ActivityLogger service for manual action logging
- ActivityLog model with user relationship
- AuditLogController with list, filter, and show endpoints
- Filter logs by action type, user ID, and date range
- Optional auto-log middleware for automatic request logging
- Indexed migration for fast queries at scale
- Soft-delete support on log entries
- Works with Laravel 10 and 11
- PSR-4 autoloaded, zero external dependencies
Requirements
- PHP 8.1 or higher
- Laravel 10 or Laravel 11
- MySQL 5.7+ or MariaDB 10.3+
- Composer
Instructions
1. Copy the provided files into your Laravel project following the included directory structure.
2. Run: php artisan migrate
3. Register AuditLogController routes in routes/api.php or routes/web.php.
4. (Optional) Add the AutoLog middleware to your kernel or route groups for automatic logging.
5. To log manually: app(ActivityLogger::class)->log('action_name', $description, $modelId)
6. Query logs via the AuditLogController endpoints or directly through ActivityLog::filter() scopes.
7. See the included README for all available scopes and method signatures.
Other items by this author
|
PHP Script Installation Service
Don't worry about the installation of your script! Have your PHP Script installed for you.
|
$39 | Buy now |
| Category | Scripts & Code / PHP Scripts / Miscellaneous |
| First release | 7 June 2026 |
| Last update | 7 June 2026 |
| Software version | PHP 8.1, PHP 8.2, PHP 8.3 |
| Files included | .php, .sql |
| Tags | php, admin panel, laravel, activity log, compliance, user tracking, middleware, audit trail, eloquent, logging |








