Download the PHP package petritr/activity-log without Composer
On this page you can find all versions of the php package petritr/activity-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download petritr/activity-log
More information about petritr/activity-log
Files in petritr/activity-log
Package activity-log
Short Description Lightweight activity logging for Laravel applications
License MIT
Homepage https://github.com/petritr/activity-log
Informations about the package activity-log
Laravel Activity Log
A small high-performance activity logging package for Laravel.
Easily track user actions, record model changes via polymorphic subjects, and store custom metadata. Designed for simplicity and flexibility, it supports both synchronous and asynchronous (queued) logging out of the box.
Key Features:
- Fluent API: Log activities using a clean, readable facade.
- Polymorphic Subjects: Link activities to any Eloquent model automatically.
- Data Snapshots: Automatically capture specific model attributes at the time of logging.
- Queue Support: Offload logging to background workers for better application performance.
- Customizable: Configurable fields, silent failure options, and more.
Installation
Install via Composer:
Publish the config file:
Run migrations:
Configuration
The package comes with a default configuration. You can customize it in config/activity-log.php.
You can also use environment variables in your .env file:
Config File Options:
config/activity-log.php:
Usage
Using the Facade (recommended)
Subject Snapshots
You can log a snapshot of any model or object:
The snapshot is stored in JSON format (subject_snapshot) in the database.
Queue Support
Enable queueing in config/activity-log.php:
Your activity will be dispatched to the queue using a Laravel Job.
License
MIT License.
All versions of activity-log with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0