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

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

namtrail/laravel-activity-log
=============================

A custom laravel package for logging model activities

1.0.2(1y ago)122PHP

Since May 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/namandhuri01/NamTrail-laravel-activity-log)[ Packagist](https://packagist.org/packages/namtrail/laravel-activity-log)[ RSS](/packages/namtrail-laravel-activity-log/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Activity Log
====================

[](#laravel-activity-log)

A Laravel package that provides easy activity logging for your Eloquent models.

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

[](#installation)

You can install the package via composer:

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

After installing, publish the config file and migrations:

```
php artisan vendor:publish --provider="NamTrail\ActivityLog\Providers\ActivityLogServiceProvider"
```

Then run the migrations:

```
php artisan migrate
```

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

[](#configuration)

You can configure the package by editing the `config/activity-log.php` file:

```
return [
    // default table name is activity_logs. But you can also set the table name via env variable. Define ACTIVITY_LOG_TABLE_NAME variable in env file
    'table_name' => env('ACTIVITY_LOG_TABLE_NAME', 'activity_logs'),

    'default_log_name' => 'default',

    'default_causer_type' => '\App\Models\User',
];
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Add the `ActivityLog` trait to your model:

```
use NamTrail\ActivityLog\Traits\ActivityLog;

class YourModel extends Model
{
    use ActivityLog;

}
```

### Customizing Logged Events

[](#customizing-logged-events)

To customize which events you logged, add a `$logEvents` property to your model:

```
    protected $logEvents = ['created', 'updated']; // Only log creation and updates
```

### Customizing Logged Attributes

[](#customizing-logged-attributes)

By default, all model attributes are logged. But you will specify which attributes to log by adding a `$logAttributes` property:

```
    protected $logAttributes = ['name', 'email']; // Only log changes to these attributes
```

### Custom Log Name

[](#custom-log-name)

You can specify a custom log name by defineing `$logName` property in your model:

```

    protected $logName = 'users';

```

### Accessing the Logs

[](#accessing-the-logs)

You can query the activity logs using the `ActivityLog` model:

```
use NamTrail\ActivityLog\Models\ActivityLog;

// Get all logs
$logs = ActivityLog::all();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance50

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d4192da50afe13bb278e28db9acb978f942f15a81a427462011340d7d89f1c6?d=identicon)[namandhuri](/maintainers/namandhuri)

---

Top Contributors

[![namandhuri01](https://avatars.githubusercontent.com/u/42140481?v=4)](https://github.com/namandhuri01 "namandhuri01 (3 commits)")

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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