PHPackages                             herca/activity-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. herca/activity-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

herca/activity-log
==================

Activity logging package for Laravel

v1.0.1(1mo ago)09↓100%MITPHPPHP ^8.0

Since Apr 17Pushed 1mo agoCompare

[ Source](https://github.com/metcore/activity-log)[ Packagist](https://packagist.org/packages/herca/activity-log)[ RSS](/packages/herca-activity-log/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Herca Activity Log
==================

[](#herca-activity-log)

A lightweight Laravel package for recording model activity logs, both automatically and manually.

Features
--------

[](#features)

- Automatic logging for `created`, `updated`, and `deleted` model events
- Manual logging through a fluent `ActivityLogger` service
- Polymorphic relation between the logged model and activity entries
- Snapshot support for `attributes`, `changes`, and `old` values
- Request correlation through `request_id`
- Optional actor tracking through `created_by`
- Configurable ignored attributes

Installation
------------

[](#installation)

Install the package with Composer in your Laravel application:

```
composer require herca/activity-log
```

Register the service provider if your Laravel version does not support package auto-discovery.

Publish Assets
--------------

[](#publish-assets)

Publish the configuration:

```
php artisan vendor:publish --tag=activity-log-config
```

Publish the migration:

```
php artisan vendor:publish --tag=activity-log-migrations
```

Run migrations:

```
php artisan migrate
```

Basic Usage
-----------

[](#basic-usage)

Add the `LogActivity` trait to any Eloquent model you want to track.

```
