Laravel — Eloquent Model History

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.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store