Log database for updated and deleted file

Published 3 years ago by wowrudy

Hi, i need to log old data when updated and deleted from database, because sometimes we need to audit what user doing in my application..

Any suggestion how to achieve that ?

Best Answer (As Selected By wowrudy)
JarekTkaczyk

@wowrudy Check this out https://github.com/jarektkaczyk/revisionable It saves static data unlike the VentureCraft's one and it is L5 compatible already.

_stefanzweifel

So you mean something like a "Revision"? If you're still on Laravel 4 I can recommend Venturecraft/revisionable. Pretty easy to setup and works great!

wowrudy

Yes.. something like that..

but there is any package like this on L5 ? because i already started my project using L5..

willvincent

It probably wouldn't take a very large effort to port that to L5.

wowrudy

but i don't know how to make it running on L5. im still newbie anyway

JarekTkaczyk

@wowrudy Check this out https://github.com/jarektkaczyk/revisionable It saves static data unlike the VentureCraft's one and it is L5 compatible already.

kodeine

@JarekTkaczyk good one!

polarcubs

@JarekTkaczyk, @wowrudy, @_stefanzweifel I think Venturecraft/revisionable now supports Laravel 5 too.

How do you compare between the 2 packages now? In which use case will one be better than the other?

JarekTkaczyk

@polarcubs I don't like the idea of logging single field changes, but rather update (or other action ofc) as a whole. This way, you can easily get history or version at given timestamp. And obviously this is how my package works.

Please sign in or create an account to participate in this conversation.