PHPackages                             kishan/audit-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. kishan/audit-log

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

kishan/audit-log
================

Audit log package to track model changes in Laravel

v1.0.1(9mo ago)13MITPHPPHP &gt;=7.4

Since Sep 9Pushed 9mo agoCompare

[ Source](https://github.com/DasadiyaKishan/AuditLog)[ Packagist](https://packagist.org/packages/kishan/audit-log)[ RSS](/packages/kishan-audit-log/feed)WikiDiscussions master Synced today

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

Audit Log for Laravel
=====================

[](#audit-log-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2816f266fb1a6e77a270d1fc91e2a568882a04646d8011002a1038bfa285f02f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b697368616e2f61756469742d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kishan/audit-log)[![Total Downloads](https://camo.githubusercontent.com/a85113522994e87430094c923ed94ce135896eb6627d915b37dff36ea711f043/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b697368616e2f61756469742d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kishan/audit-log)

A simple Laravel package to track model changes (create, update, delete) with an audit log.

---

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

[](#installation)

You can install the package via Composer:

```
composer require kishan/audit-log

## Service Provider (for Laravel < 5.5)

If you are using Laravel 5.4 or lower, add the service provider manually in config/app.php:

'providers' => [
    Kishan\AuditLog\AuditLogServiceProvider::class,
];

## ⚙️ Publish & Migrate
Publish the migration and run the database migrations:

php artisan vendor:publish --provider="Kishan\AuditLog\AuditLogServiceProvider" --tag="migrations"
php artisan migrate

(Optional) Publish the config file if you want to customize settings:
php artisan vendor:publish --provider="Kishan\AuditLog\AuditLogServiceProvider" --tag="config"

🛠 Usage
1. Add trait to your model
use Illuminate\Database\Eloquent\Model;
use Kishan\AuditLog\Traits\LogsActivity;

class Post extends Model
{
    use LogsActivity;

    protected $fillable = ['title', 'content'];
}
2. Retrieve all logs
use Kishan\AuditLog\Models\AuditLog;

$logs = AuditLog::all();

3. Advanced logging example
activity()
    ->performedOn($post) // Eloquent model
    ->causedBy(auth()->user()) // The user who triggered the action
    ->withProperties(['customProperty' => 'customValue']) // Extra data
    ->log('Post was updated');

$lastActivity = \Kishan\AuditLog\Models\AuditLog::all()->last();

$lastActivity->subject;        // returns the Post model
$lastActivity->causer;         // returns the User model
$lastActivity->changes;        // returns changed attributes
$lastActivity->description;    // "Post was updated"

4. Example on event logging
$post->title = 'Updated title';
$post->save();

// This automatically logs changes
$activity = \Kishan\AuditLog\Models\AuditLog::all()->last();

$activity->description; // "updated"
$activity->changes;     // shows old and new values

✅ Testing

Run the tests with:
composer test

🤝 Contributing

Contributions, issues, and feature requests are welcome!
Feel free to fork this repo and submit a pull request.

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance55

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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

2

Last Release

299d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/94835892?v=4)[Dasadiya kishan](/maintainers/DasadiyaKishan)[@DasadiyaKishan](https://github.com/DasadiyaKishan)

---

Top Contributors

[![DasadiyaKishan](https://avatars.githubusercontent.com/u/94835892?v=4)](https://github.com/DasadiyaKishan "DasadiyaKishan (8 commits)")

---

Tags

laravelloggingaudit-logmodel events

### Embed Badge

![Health badge](/badges/kishan-audit-log/health.svg)

```
[![Health](https://phpackages.com/badges/kishan-audit-log/health.svg)](https://phpackages.com/packages/kishan-audit-log)
```

###  Alternatives

[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k127.1M204](/packages/sentry-sentry-laravel)[naoray/laravel-github-monolog

Log driver to store logs as github issues

10823.1k](/packages/naoray-laravel-github-monolog)[spatie/laravel-flare

Send Laravel errors to Flare

111.4M7](/packages/spatie-laravel-flare)

PHPackages © 2026

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