Download the PHP package webqamdev/activity-logger without Composer
On this page you can find all versions of the php package webqamdev/activity-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webqamdev/activity-logger
More information about webqamdev/activity-logger
Files in webqamdev/activity-logger
Package activity-logger
Short Description Log every model creation, edition and deletion.
License
Informations about the package activity-logger
Log activity inside your Laravel app
The webqamdev/activity-logger package automatically log model changes from users into database and log files.
Dependencies
This package use spatie/laravel-activitylog to store logs in database. Feel free to configure it if needed or just follow Installation instructions.
Installation
You can install the package via composer:
The package will automatically register itself.
Configure spatie/laravel-activitylog. By default, run those commands :
You can optionally publish the config file with:
Usage
Model Configuration & Detailed Logs
To enable detailed logging and ensure the logs follow the standard Spatie format (recording changes with old and
attributes values in attribute_changes), your model must use the Spatie\Activitylog\Models\Concerns\LogsActivity
trait and implement the getActivitylogOptions method.
Set $enableLoggingModelsEvents = false on the model to avoid duplicate logs (this package already listens to Eloquent events).
This is necessary to achieve the following structure in your logs (showing what changed):
Example:
Globally hide a property
Publish config file. Then add entries to properties_hidden array.
Hide a Model property
Create your model normally, then define hidden properties.
Disable logs into database
Add ACTIVITY_LOGGER_TO_DATABASE=false to your .env file will prevent logger from writing into database.
Change files permission
If not already done, publish config file:
Add channel.permission to your config/activitylogger.php file like this exemple:
Upgrading
Please see UPGRADING for details.
About
This package requires Laravel 12+ and PHP 8.4+. It is a plugin for auto-logging model activities.
Gitlab repository : Activity logger for Laravel Github repository : Activity logger for Laravel
All versions of activity-logger with dependencies
illuminate/support Version ^12.0 || ^13.0
spatie/laravel-activitylog Version ^5.0