PHPackages                             cybernerdie/laravel-model-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. cybernerdie/laravel-model-activity-log

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

cybernerdie/laravel-model-activity-log
======================================

A simple package to log model activities inside your laravel application

1.0.2(3y ago)29[2 PRs](https://github.com/cybernerdie/laravel-model-activity-log/pulls)MITPHPPHP ^8.0

Since Sep 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cybernerdie/laravel-model-activity-log)[ Packagist](https://packagist.org/packages/cybernerdie/laravel-model-activity-log)[ Docs](https://github.com/cybernerdie/laravel-model-activity-log)[ RSS](/packages/cybernerdie-laravel-model-activity-log/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (13)Versions (5)Used By (0)

A simple package to log model activities inside your laravel application
========================================================================

[](#a-simple-package-to-log-model-activities-inside-your-laravel-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/23f300c4065b5b1033231d3e69c496d21760929e422a8453499d39461f691871/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63796265726e65726469652f6c61726176656c2d6d6f64656c2d61637469766974792d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cybernerdie/laravel-model-activity-log)[![GitHub Tests Action Status](https://camo.githubusercontent.com/682af0484ef1b27c8ae90955dfcf6bb799a71bed72994a8d861c76be55e777b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f63796265726e65726469652f6c61726176656c2d6d6f64656c2d61637469766974792d6c6f672f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/cybernerdie/laravel-model-activity-log/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3bea55e713e85f3aa91d80197b337a2715cae1f921b68d9513ed57440ee20088/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f63796265726e65726469652f6c61726176656c2d6d6f64656c2d61637469766974792d6c6f672f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/cybernerdie/laravel-model-activity-log/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9ee0b382184ca8e4d1346b9edd897042c140f87df24e0bc89426fd71d16cc665/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63796265726e65726469652f6c61726176656c2d6d6f64656c2d61637469766974792d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cybernerdie/laravel-model-activity-log)

This package logs model activities inside your Laravel application.

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

[](#installation)

You can install the package via composer:

```
composer require cybernerdie/laravel-model-activity-log
```

You can publish the migrations with:

```
php artisan vendor:publish --provider="Cybernerdie\\ModelActivityLog\\ModelActivityLogServiceProvider"
```

You can run the migrations with:

```
php artisan migrate
```

Usage
-----

[](#usage)

Add the trait to your model and also import the class:

```
use RecordModelActivity;
```

Optionally, you can set the events to be recorded for your model:

```
protected static $eventsToRecord = ['created', 'updated'];
```

Optionally, you can add columns in your model that you want to ignore when events are recorded:

```
 protected static $columnsToIgnore = ['email'];
```

Retrieve activities for a model:

```
$user = User::find(1);
$activities = ModelActivityLog::subjectBy($user)->get();
```

Retrieve activities by event type:

```
$activities = ModelActivityLog::event('created')->get();
```

Retrieve changes for a specific activity:

```
$activities = ModelActivityLog::find(1)->changes();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Joshua Paul](https://github.com/cybernerdie)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

1373d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/52431939?v=4)[Joshua Paul](/maintainers/cybernerdie)[@cybernerdie](https://github.com/cybernerdie)

---

Top Contributors

[![cybernerdie](https://avatars.githubusercontent.com/u/52431939?v=4)](https://github.com/cybernerdie "cybernerdie (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelcybernerdielaravel-model-activity-log

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cybernerdie-laravel-model-activity-log/health.svg)

```
[![Health](https://phpackages.com/badges/cybernerdie-laravel-model-activity-log/health.svg)](https://phpackages.com/packages/cybernerdie-laravel-model-activity-log)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

167558.4k1](/packages/keepsuit-laravel-opentelemetry)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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