PHPackages                             alkhachatryan/laravel-loggable - 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. [Database &amp; ORM](/categories/database)
4. /
5. alkhachatryan/laravel-loggable

AbandonedArchivedPackage[Database &amp; ORM](/categories/database)

alkhachatryan/laravel-loggable
==============================

Laravel Loggable - Log your model changes in multiple ways.

1.2(6y ago)573915MITPHP

Since Jan 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alkhachatryan/laravel-loggable)[ Packagist](https://packagist.org/packages/alkhachatryan/laravel-loggable)[ RSS](/packages/alkhachatryan-laravel-loggable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (6)Used By (0)

Laravel Loggable - Log you model changes
========================================

[](#laravel-loggable---log-you-model-changes)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Packagist Version](https://camo.githubusercontent.com/87ef12cc7b01293584821609f9638ba86fb537d6d31d1496c4f52cc0053d2de9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6b6861636861747279616e2f6c61726176656c2d6c6f676761626c65)](https://camo.githubusercontent.com/87ef12cc7b01293584821609f9638ba86fb537d6d31d1496c4f52cc0053d2de9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6b6861636861747279616e2f6c61726176656c2d6c6f676761626c65)[![CodeFactor Grade](https://camo.githubusercontent.com/0411c52f17ee4518b93dea1482d874513547717d1e4aec76bde86a06b245645c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465666163746f722f67726164652f6769746875622f616c6b6861636861747279616e2f6c61726176656c2d6c6f676761626c65)](https://camo.githubusercontent.com/0411c52f17ee4518b93dea1482d874513547717d1e4aec76bde86a06b245645c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465666163746f722f67726164652f6769746875622f616c6b6861636861747279616e2f6c61726176656c2d6c6f676761626c65)[![Total Downloads](https://camo.githubusercontent.com/93e183a61891f793630e7e58f9cf79d8c4e98d29c609d4eea782176b7f99801a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6b6861636861747279616e2f6c61726176656c2d6c6f676761626c652e7376673f7374796c653d666c61742d73717561726526636f6c6f723d627269676874677265656e)](https://packagist.org/packages/alkhachatryan/laravel-loggable)[![](https://camo.githubusercontent.com/7df8d3a825bf9cfa2bcee0c13c9548a97811b54cf5547556bbd9052dd8c75d38/68747470733a2f2f6b6f6d617265762e636f6d2f67687076632f3f757365726e616d653d616c6b6861636861747279616e2d6c61726176656c2d6c6f676761626c65266c6162656c3d5265706f2b766965777326636f6c6f723d627269676874677265656e267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7df8d3a825bf9cfa2bcee0c13c9548a97811b54cf5547556bbd9052dd8c75d38/68747470733a2f2f6b6f6d617265762e636f6d2f67687076632f3f757365726e616d653d616c6b6861636861747279616e2d6c61726176656c2d6c6f676761626c65266c6162656c3d5265706f2b766965777326636f6c6f723d627269676874677265656e267374796c653d666c61742d737175617265)

Laravel Loggable is a package for eloquent models, which will monitor the changes on the models and log. It supports two drivers: File and Database.

Features
========

[](#features)

- High-configurable
- Two drivers (database and file)
- Possibillity to use two drivers at once
- Possibillity to select the columns for the model which should be logged
- Possibillity to select the actions for the model which should be logged (create, edit, delete)
- Facade-based structure to fetch the logs for specific model
- Much more

[![Logs](https://raw.githubusercontent.com/alkhachatryan/laravel-loggable/master/photo.jpg)](https://raw.githubusercontent.com/alkhachatryan/laravel-loggable/master/photo.jpg)

Installation
============

[](#installation)

##### Install the package.

[](#install-the-package)

`composer require alkhachatryan/laravel-loggable`

##### Publish the configuration file

[](#publish-the-configuration-file)

`php artisan vendor:publish --tag=loggable`

##### Run migration

[](#run-migration)

`php artisan migrate`

Configuration
=============

[](#configuration)

Open the configuration file at /config/loggable.php

Set the driver whhich will log the model changes (can be both). However, it's recommended to use the database driver so you can fetch the logs in the future.

```
'driver' => 'database'
```

That's it!

Usage
=====

[](#usage)

```
class Post extends Model
{
    /** Include the loggable trait */
    use Loggable;

    /** Specified actions for this model */
    public $loggable_actions = ['edit', 'create', 'delete'];

    /** Specified fields for this model */
    public $loggable_fields  = ['title', 'body'];

    protected $fillable = ['title', 'body'];
}
```

##### Retriving the model logs via Facade

[](#retriving-the-model-logs-via-facade)

```
Loggable::model('App\Post');
```

##### Retriving the model logs via Model

[](#retriving-the-model-logs-via-model)

```
LoggableModel::whereModelName('App\Post')->orderBy('id', 'DESC')->paginate(10);
```

##### Event

[](#event)

You can use the event *Alkhachatryan\\LaravelLoggable\\Events\\Logged* in pair with your listeners.

Changelog
=========

[](#changelog)

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

Todo
====

[](#todo)

Tests!!! Tests!!! Tests!!!

Security
========

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
=======

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 60.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 ~18 days

Total

3

Last Release

2284d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1f08584e53602ccd15b0148ce1ffec061304848cb0e9af2658fee4100fdc6a7?d=identicon)[alkhachatryan](/maintainers/alkhachatryan)

---

Top Contributors

[![alkhachatryan](https://avatars.githubusercontent.com/u/22774727?v=4)](https://github.com/alkhachatryan "alkhachatryan (23 commits)")[![allcontributors[bot]](https://avatars.githubusercontent.com/in/23186?v=4)](https://github.com/allcontributors[bot] "allcontributors[bot] (12 commits)")[![imliam](https://avatars.githubusercontent.com/u/4326337?v=4)](https://github.com/imliam "imliam (2 commits)")[![deligoez](https://avatars.githubusercontent.com/u/3030815?v=4)](https://github.com/deligoez "deligoez (1 commits)")

---

Tags

eloquentlaravellaravel-loggablelogloggermodellaravel

### Embed Badge

![Health badge](/badges/alkhachatryan-laravel-loggable/health.svg)

```
[![Health](https://phpackages.com/badges/alkhachatryan-laravel-loggable/health.svg)](https://phpackages.com/packages/alkhachatryan-laravel-loggable)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

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