Download the PHP package elkady/activity-logger without Composer
On this page you can find all versions of the php package elkady/activity-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elkady/activity-logger
More information about elkady/activity-logger
Files in elkady/activity-logger
Package activity-logger
Short Description A Laravel package for logging auths activities.
License MIT
Informations about the package activity-logger
Laravel Activity Logger
A Laravel package for automatically logging authenticated users' actions (create, update, delete, restore) on any model using the HasActivityLogs trait.
Features
- 🔄 Automatic Logging via Laravel Observers — no manual calls required
- ⚙️ Trait-Driven — add
HasActivityLogsto any model you want tracked, no config list to maintain - 🔐 Multi-Guard Aware — resolves the causer across web, api, admin, or any custom guard
- 🔗 Polymorphic Relations — logs both the causer and the affected model
- 🛠 Easy Integration — install, configure, done
- ♻️ Soft-Delete Aware — logs
restoredin addition tocreated/updated/deleted - 📊 Filterable Reports — query logs by subject, causer, action, or date range with chainable Eloquent scopes
- 🖥 Built-in Report Page — an optional, ready-made filterable UI, no front-end work required
Installation
Install the package via Composer:
After installation you have to publish the config file
This will create a config file at:
then you have to migrate the added database:
Usage
Add HasActivityLogs to any model you want to track — that's what turns on logging for it, no config array required:
Every created, updated, deleted, and restored event on Post is now logged automatically, attributed to whichever guard-authenticated user performed it. Read them back via the relation the trait adds:
Reports & Filtering
ActivityLog ships with scopes so you can build reports without writing raw queries:
Report UI
The package includes an optional, self-contained report page — a filter bar (action, subject type, causer type, date range) plus a paginated table — with no front-end setup required. It's off by default. Turn it on in config/activity-logger.php:
The package has no opinion on who should be allowed to view the logs, so always add your own auth middleware (or a custom gate-based middleware) to ui.middleware before enabling it — otherwise the page is open to anyone who can reach the route.
Visit /activity-logs (or whatever ui.path is set to) to see it. To customize the look, publish the view:
Update the Config File
In config/activity-logger.php, list the guards to check for the current user and which lifecycle events to record:
All versions of activity-logger with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/view Version ^9.0|^10.0|^11.0|^12.0|^13.0