Closed codydh closed 8 years ago
You'd have to manually bind an event to updating
. Quick example:
protected static function boot()
{
static::updating(function ($model) {
Activity::log("{$model->name} just updated to {$model->getOriginal('name')}");
}
}
I'm trying to implement logging on a model of mine. Namely, when a value is updated, I'd like to log what the previous value was, and what the new value is. Is there a straightforward way to do this using ActivityLog?