PHPackages                             sarahman/laravel-activitylog-with-pivots - 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. sarahman/laravel-activitylog-with-pivots

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

sarahman/laravel-activitylog-with-pivots
========================================

Activity Log package deals with all kinds of Eloquent events based logging as well as pivot models events.

1705[1 issues](https://github.com/sarahman/laravel-activitylog-with-pivots/issues)PHP

Since Jan 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sarahman/laravel-activitylog-with-pivots)[ Packagist](https://packagist.org/packages/sarahman/laravel-activitylog-with-pivots)[ RSS](/packages/sarahman-laravel-activitylog-with-pivots/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Laravel Activity Log with Pivots
================================

[](#laravel-activity-log-with-pivots)

This package highly depends on the `spatie/laravel-activitylog` and `fico7489/laravel-pivot` composer packages. This package deals with all kinds of `Eloquent` events based logging as well as the `Pivot` models events.

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

[](#installation)

1. Install package with composer:

```
composer require sarahman/laravel-activitylog-with-pivots
```

With this statement, the highest available package version for your current laravel/lumen version will be installed.

2. Follow the [documentation](https://docs.spatie.be/laravel-activitylog.) of the `spatie/laravel-activitylog` to install with skipping the `composer` package installation command.
3. Use `Sarahman\Database\Support\Traits\LogsActivityWithPivots` trait in your base model or only in particular models.

```
use Sarahman\Database\Support\Traits\LogsActivityWithPivots;
use Illuminate\Database\Eloquent\Model;

abstract class BaseModel extends Model
{
    use LogsActivityWithPivots;
    ...
    ...
}
```

and that's it; enjoy!

New Eloquent Events
-------------------

[](#new-eloquent-events)

You can check all the Eloquent events here: ()

The following Pivot based events functionality is customized:

```
pivotAttached, pivotDetached, pivotUpdated

```

The activity log is also stored while these pivot events will be occurred. You may check the other Pivot events [here](https://github.com/fico7489/laravel-pivot#new-eloquent-events).

Licence
-------

[](#licence)

MIT

Support
-------

[](#support)

If you are having general issues with this package, feel free to contact me through Gmail.

If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request.

If you're using this package, I'd love to hear your thoughts. Thanks!

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c482155504a6d98bd167e89aaf9a873d1355cd771cbe2a0c11cab87a5296845?d=identicon)[sarahman](/maintainers/sarahman)

---

Top Contributors

[![sarahman](https://avatars.githubusercontent.com/u/3045127?v=4)](https://github.com/sarahman "sarahman (4 commits)")[![shohoz-abid](https://avatars.githubusercontent.com/u/57485589?v=4)](https://github.com/shohoz-abid "shohoz-abid (4 commits)")

### Embed Badge

![Health badge](/badges/sarahman-laravel-activitylog-with-pivots/health.svg)

```
[![Health](https://phpackages.com/badges/sarahman-laravel-activitylog-with-pivots/health.svg)](https://phpackages.com/packages/sarahman-laravel-activitylog-with-pivots)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
