Laravel — Eloquent Model History

Rudashi
Nov 12, 2020

--

Wouldn’t it be cool if there was a history of the model in our project?

Yes of course! You only need to add the HasHistory Trait and the HasHistoryInterface Interface to the choosen model.

You will receive the history of actions performed on a given model in an easily accessible way:

  • created
  • updated
  • deleted
  • restored

A user is assigned to each action, if logged in. This means that you can receive full information that a specific user has performed on tracked models.

The exact installation is in the repository.

https://github.com/rudashi/laravel-history/

--

--