PHPackages                             zeshan77/activity-monitor - 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. zeshan77/activity-monitor

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

zeshan77/activity-monitor
=========================

Monitor your eloquent model activities

1.2.4(8y ago)133MITPHPPHP &gt;=5.6

Since Jan 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/zeshan77/activity-monitor)[ Packagist](https://packagist.org/packages/zeshan77/activity-monitor)[ Docs](https://github.com/zeshan77/activity-monitor)[ RSS](/packages/zeshan77-activity-monitor/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

A powerfull, an easy to use eloquent activity monitor
=====================================================

[](#a-powerfull-an-easy-to-use-eloquent-activity-monitor)

Activity-monitor is a powerful, easy to use laravel eloquent activity monitor. We sometimes want to keep track of what's going on in a database table, who makes what changes, at what time etc. This package will help easy this for you.

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

[](#installation)

You can install this package via composer using this command:

```
composer require zeshan77/activity-monitor

```

Configure the service provider as given below:

```
// config/app.php
'providers' => [
    ...
    \Zeshan77\ActivityMonitorServiceProvider::class,
];

```

Publish the migration with:

```
php artisan vendor:publish --provider="\Zeshan77\ActivityMonitorServiceProvider --tag="migrations"

```

After the migration has been published you can create the `activities` table by running the migrations:

`php artisan migrate`

Usage
=====

[](#usage)

Import `RecordsActivity` trait in eloquent model which needs to be monitored.

```
use Zeshan77\ActivityMonitor\RecordsActivity;

```

After import, use `RecordsActivity` trait in the model as shown below in Post model.

```
class Post extends Model
{
    use RecordsActivity;

    //

}

```

A basic `Post` model will look something similar below:

```
