Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

massel's avatar

Laravel Audit

I am using laravel Owen Audit installed using "composer require owen-it/laravel-auditing" and installed accoring to the document , I put the script in my config/audit file but only the create log is being created.

Please can anyone be of help.

'events' => [ 'created', 'updated', 'deleted' ],

0 likes
3 replies
enoch91's avatar

@massel Make sure that the models you are auditing are using the Auditable trait.

use OwenIt\Auditing\Contracts\Auditable;

class YourModel extends Model implements Auditable
{
    use \OwenIt\Auditing\Auditable;
}

On the configuration config/audit.php

'enabled' => true,
'events' => [
    'created',
    'updated',
    'deleted',
],
enoch91's avatar

@massel Ensure that you are using the latest version of the owen-it/laravel-auditing package. You can update the package using

composer update owen-it/laravel-auditing

Also, make sure that your audited models have the necessary timestamps. The Auditable trait uses the created_at and updated_at timestamps to record when the audit occurred.

Please or to participate in this conversation.