Hi, Im using Laravel 5.2 and Auditing 3.1.
When updating a post, only the USERS table writes the UPDATED action. The other tables do not. Below are sample images:
My USER model - UPDATED works fine

My NEWS Model - UPDATED do not record in audits table:

Works with ->save();
Dont work with ->update();
Hi @rafalau
Try using the development version:
composer require owen-it/laravel-auditing 4.0.x-dev
And let me know if the issue still persists.
You'll have to do minor changes to your code. Check the latest documentation if you have any doubts.
Hi!
I followed the next steps:
1 - composer require owen-it/laravel-auditing 4.0.x-dev
2 - Add the service provider: OwenIt\Auditing\AuditingServiceProvider::class,
3 - Run: php artisan auditing:install
4 - migrate the data base
5 - Configure my Model:

And the issue persists!
Works with ->save();
Dont work with ->update();
See My Update Comand (Dont record comand UPDATE in AUDITS DATABASE ):

Se my Save Comand (Works fine)

Maybe this?
https://laravel.com/docs/5.4/eloquent
When issuing a mass update via Eloquent, the saved and updated model events will not be fired for the updated models. This is because the models are never actually retrieved when issuing a mass update.
@rafalau, do the logs show anything at all?
What happens if you listen for the auditing / audited events? Do they fire regardless of the Eloquent event (saved, created, updated) that started the audit process?
Hi @rafalau ,
This may be the same as https://github.com/owen-it/laravel-auditing/issues/139#issuecomment-257004656
This type of query does not trigger events in laravel: $model->where(...)->update(...)
You will probably have to find the record, make the changes, and then save.
Or force an audit log.
Hi, How do I force an audit log?
Hello, @quetzyg Just like I said @anteriovieira, $model->where(...)->update(...) does not trigger events in laravel.
@quetzyg, could you provide an example of how @rafalau can force an update audit?
@rafalau , take a look here, maybe you can help. I can not create a test example now, but I think @quetzyg will be able to help you later.
Okay, thank you so much for help.
As @anteriovieira mentioned, the way you're updating the model won't trigger the updated event, which in turn won't execute an audit.
I would suggest to update your code from:
$this->model->where('id', $id)->update($dadosForm);
to what you have on the second code you show, but with a slight change:
$dados = $this->model->find('id', $id);
$dados->update($dadosForm);
This should work, but it could still be improved. You should think about using model binding on the routes, so you don't have to query around to get the actual model. The model should just be passed to the postEditar() method.
And while the documentation has examples on how to use the Auditor directly, you shouldn't need to if you play by the rules.
Friends, I do not know how to express my gratitude. It's working perfectly. Here's what the final code looks like:

$dados = $this->model->find($id);
$dados->update($dadosForm);
Thanks @rafalau , thank you for your confidence in our package. And I also thank @quetzyg for his beautiful work.
How do I Audit If I have a million records to update?
Most helpful comment
Hi @rafalau ,
This may be the same as https://github.com/owen-it/laravel-auditing/issues/139#issuecomment-257004656
This type of query does not trigger events in laravel:
$model->where(...)->update(...)You will probably have to find the record, make the changes, and then save.
Or force an audit log.