PHPackages                             drewlabs/changelog-eloquent - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. drewlabs/changelog-eloquent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

drewlabs/changelog-eloquent
===========================

eloquent driver for drewlabs/changelog library

v0.3.1(1y ago)090MITPHP

Since Mar 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/azlabsphp/changelog-eloquent)[ Packagist](https://packagist.org/packages/drewlabs/changelog-eloquent)[ RSS](/packages/drewlabs-changelog-eloquent/feed)WikiDiscussions master Synced 1mo ago

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

Eloquent changelog
==================

[](#eloquent-changelog)

Provides laravel eloquent compatible table changes logger. For more information about changelog implementation, go to \[\].

Usage
=====

[](#usage)

To register eloquent changelog driver, simply add the provided service provider in your laravel application configuration:

```
// config/app.php
return [
    // ...

    'providers' => [
        // ...
        \Drewlabs\Changelog\Eloquent\ServiceProvider::class,
        // ...
    ]
];

```

The library comes with a command for creating logs table in your application database. In order to run the migration:

> php artisan changelog:migrate --refresh --connection=

**Note** By default, the command use `mysql` connection if no connection option is passed.

**Note** The above configuration allows you to easily log table changes in your application.

- Loggable trait

The library also comes with a handy trait that can be added to your eloquent model that allows them to log their changes using configured drivers. To provide a model with the logging abilities on changes:

```php
