neelbhanushali / laravel-audit-log
Audit Log for Laravel
v1.0
2019-10-28 17:34 UTC
This package is auto-updated.
Last update: 2025-04-29 01:20:59 UTC
README
Audit Log for laravel
- Use
NeelBhanushali\LaravelAuditLog\Traits\Auditable
trait in your model.
For advance use
- Lets say you need to audit
roles
but as perusers
. - Use case: You need to check what/when
roles
were assigned tousers
. - Add following
AUDIT
constant
const AUDIT = [
'relation' => 'token',
'entity_id' => 'key',
'entity_type' => Token::class,
'parent_id' => 'user_id',
'parent_type' => User::class
];
-
entity_id
,parent_id
can have following values:key
: gets value of primary key of current recordcolumn_name
: gets value of column from current record
-
entity_type
,parent_type
can have following values:class_path
column_name
: gets value of column from current record (in case of morph)