I have hook to track changes in database. I used this hook in app/helpers.php
. i want to know how to call this function and use this after insert, update and saving.
helpers.php
function loggerAuditing($model)
{
$changes = array();
foreach($model->getDirty() as $key => $value){
$original = $model->getOriginal($key);
$changes[$key] = [
'old' => $original,
'new' => $value,
];
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire