Skip to content
πŸŽ₯ πŸ“½ 🎞 Log your model changes in multiple ways
Branch: development
Clone or download
Latest commit 157ea00 Jan 16, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Apply fixes from StyleCI Jan 5, 2020
src Remove call to parent boot method, as it's now not overwritten Jan 15, 2020
tests Apply fixes from StyleCI Jan 5, 2020
.all-contributorsrc Update .all-contributorsrc Jan 16, 2020
.codecov.yml First commit Jan 1, 2020
.styleci.yml First commit Jan 1, 2020
.travis.yml First commit Jan 1, 2020 Update Jan 5, 2020 First commit Jan 1, 2020 docs: update [skip ci] Jan 16, 2020
composer.json First commit Jan 1, 2020
photo.jpg Add files via upload Jan 5, 2020
phpunit.xml First commit Jan 1, 2020

Laravel Loggable - Log you model changes

Software License Total Downloads Packagist Version CodeFactor Grade

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


  • 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



Install the package.

composer require alkhachatryan/laravel-loggable

Publish the configuration file

php artisan vendor:publish --tag=loggable

Run migration

php artisan migrate


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!


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 Model
LoggableModel::whereModelName('App\Post')->orderBy('id', 'DESC')->paginate(10);

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


Please see CHANGELOG for more information what has changed recently.


Liam Hammett



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


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


The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.