PHPackages                             djunehor/laravel-revert-query - 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. djunehor/laravel-revert-query

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

djunehor/laravel-revert-query
=============================

Log all model events and revert specific model event

1.0.0(6y ago)817MITPHPPHP ~7.0|~7.2CI failing

Since Nov 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/djunehor/laravel-revert-model-event)[ Packagist](https://packagist.org/packages/djunehor/laravel-revert-query)[ RSS](/packages/djunehor-laravel-revert-query/feed)WikiDiscussions master Synced yesterday

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

Laravel Model Event Log &amp; Revert
====================================

[](#laravel-model-event-log--revert)

[![CircleCI](https://camo.githubusercontent.com/eeadc5e441f3ae087ff01258c382379b335d9de7c0a28f417590487847dcf05b/68747470733a2f2f636972636c6563692e636f6d2f67682f646a756e65686f722f6c61726176656c2d7265766572742d6d6f64656c2d6576656e742e7376673f7374796c653d737667)](https://circleci.com/gh/djunehor/laravel-revert-model-event)[![Latest Stable Version](https://camo.githubusercontent.com/341bde25b3d9f089309c4922e21f6d01843ab8db773b2751bfa34f79904de5f6/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f6c61726176656c2d7265766572742d71756572792f762f737461626c65)](https://packagist.org/packages/djunehor/laravel-revert-query)[![Total Downloads](https://camo.githubusercontent.com/d6dd942bbeac5deb007c0a25a0c6c25775379cf51be5892ae120dfe5ea6e6727/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f6c61726176656c2d7265766572742d71756572792f646f776e6c6f616473)](https://packagist.org/packages/djunehor/laravel-revert-query)[![License](https://camo.githubusercontent.com/9807e555b3f03f9a9d84fd78be3f9d0831d870b3ab05b183ccbc6d51ce42e0d5/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f6c61726176656c2d7265766572742d71756572792f6c6963656e7365)](https://packagist.org/packages/djunehor/laravel-revert-query)[![StyleCI](https://camo.githubusercontent.com/c8223bf7f6fccac0dce01711203527c72db53ad5c30e5b32586087bf6d06747c/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231333032393632312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/213029621)[![Build Status](https://camo.githubusercontent.com/7a14a5b8a798dbcb92cbdf054bd01714244d65aa0974860383b070df12f51e36/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f6c61726176656c2d7265766572742d6d6f64656c2d6576656e742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/laravel-revert-model-event/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/45e6b6facc994e26d285d68a289d6ca275adaa58796062ee2520b89e9bf0d17e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f6c61726176656c2d7265766572742d6d6f64656c2d6576656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/laravel-revert-model-event/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/b9bd957ea85f23b244b287b69af683f78a71f056b767e6544c0952ee6b3a2278/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f6c61726176656c2d7265766572742d6d6f64656c2d6576656e742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/laravel-revert-model-event/?branch=master)

Laravel Model Event Logger and Revert logs every action on a model (create, delete, update), provides an interface to see the list of all activities as well as revert specific model event.

- [Laravel Model Event](#laravel-model-event)
    - [Installation](#installation)
        - [Laravel 5.5 and above](#laravel-55-and-above)
        - [Laravel 5.4 and older](#laravel-54-and-older)
        - [Lumen](#lumen)
    - [Usage](#usage)
        - [All parts of speech](#get-all-parts-of-speech)
        - [Get part of speech](#get-word-part-of-speech)
    - [Contributing](#contributing)

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

[](#installation)

### Step 1

[](#step-1)

You can install the package via composer:

```
composer require djunehor/laravel-revert-query
```

#### Laravel 5.5 and above

[](#laravel-55-and-above)

The package will automatically register itself, so you can start using it immediately.

#### Laravel 5.4 and older

[](#laravel-54-and-older)

In Laravel version 5.4 and older, you have to add the service provider in `config/app.php` file manually:

```
'providers' => [
    // ...
    Djunehor\EventRevert\EventRevertServiceProvider::class,
];
```

#### Lumen

[](#lumen)

After installing the package, you will have to register it in `bootstrap/app.php` file manually:

```
// Register Service Providers
    // ...
    $app->register(Djunehor\EventRevert\EventRevertServiceProvider::class);
];
```

### Step 2 - Publishing files

[](#step-2---publishing-files)

- Run: `php artisan vendor:publish --tag=ModelEventLogger`This will move the migration file, seeder file and config file to your app.
- Open `config/model-event-logger` to set the model name and ID of users allowed to access to model event log routes
- the ID can be a number or list of comma-separated numbers e.g `1,2,3,4,5`

### Step 3 - SetUp database

[](#step-3---setup-database)

- Run`php artisan migrate` to create the table.

Usage
-----

[](#usage)

```
use Djunehor\EventRevert\ModelEventLogger;`
```

- Add `use ModelEventLogger` to your laravel model

### Access Saved model event logs

[](#access-saved-model-event-logs)

EndpointDescription`/model-events`return all saved model events`/model-events/{log}`return all model events of a specific model`/model-event-revert/{id}`revert specific model event### Reverting via Console

[](#reverting-via-console)

If you know the specific ID of the event you which you revert, you can run: `php artisan model:revert --id=EVENT_ID`

Contributing
------------

[](#contributing)

- Fork this project
- Clone to your repo
- Make your changes and run tests `composer test`
- Push and create Pull Request

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

2362d ago

Major Versions

0.1.0 → 1.0.02019-11-23

### Community

Maintainers

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

---

Top Contributors

[![djunehor](https://avatars.githubusercontent.com/u/20708833?v=4)](https://github.com/djunehor "djunehor (11 commits)")

---

Tags

laravellaravel-packagemodeleventlaraveldatabasemodelrevertspecific

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/djunehor-laravel-revert-query/health.svg)

```
[![Health](https://phpackages.com/badges/djunehor-laravel-revert-query/health.svg)](https://phpackages.com/packages/djunehor-laravel-revert-query)
```

PHPackages © 2026

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