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

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

vjlau/laravel-activity-log
==========================

Laravel Activity Log

2192PHP

Since Feb 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/vj-lau/laravel-activity-log)[ Packagist](https://packagist.org/packages/vjlau/laravel-activity-log)[ RSS](/packages/vjlau-laravel-activity-log/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-activity-log
====================

[](#laravel-activity-log)

Laravel Activity Log

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

[](#installation)

Make sure you have the MongoDB PHP driver installed. You can find installation instructions at

Install through Composer

```
composer require vjlau/laravel-activity-log

```

Configuration
-------------

[](#configuration)

And add a new mongodb connection `config/database.php`:

```
'mongodb' => [
    'driver'   => 'mongodb',
    'host'     => env('DB_HOST', 'localhost'),
    'port'     => env('DB_PORT', 27017),
    'database' => env('DB_DATABASE'),
    'username' => env('DB_USERNAME'),
    'password' => env('DB_PASSWORD'),
    'options'  => [
        'database' => 'admin' // sets the authentication database required by mongo 3
    ]
],

```

Setup
-----

[](#setup)

### Step 1: Register the Service Provider

[](#step-1-register-the-service-provider)

Add the ActivityLogServiceProvider to the providers array in the `config/app.php` file;

```
Jenssegers\Mongodb\MongodbServiceProvider::class,
VJLau\ActivityLog\ActivityLogServiceProvider::class,
VJLau\ActivityLog\QueryLogServiceProvider::class,

```

### Step 2: Publish config

[](#step-2-publish-config)

```
php artisan vendor:publish --provider="VJLau\ActivityLog\ActivityLogServiceProvider" --tag="config"

```

Usage
-----

[](#usage)

To subscribe model for activity log just use `VJLau\ActivityLog\Loggable`

```
use VJLau\ActivityLog\Loggable;

```

To add usage in your model

```
use Loggable;

```

To add middleware in your kernel

```
protected $routeMiddleware = [
    ......
    'log.request' => \VJLau\ActivityLog\Middleware\LogAfterRequest::class,
];

```

Credits
-------

[](#credits)

 - Activity Log for Laravel Eloquent Models

License
-------

[](#license)

MIT -

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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://avatars.githubusercontent.com/u/3838041?v=4)[VJLau](/maintainers/vj-lau)[@vj-lau](https://github.com/vj-lau)

---

Top Contributors

[![vj-lau](https://avatars.githubusercontent.com/u/3838041?v=4)](https://github.com/vj-lau "vj-lau (13 commits)")

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M262](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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