composer require gupalo/auditlog-bundleAdd to config/bundles.php
Gupalo\AuditLogBundle\AuditLogBundle::class => ['all' => true]Add to config/packages/doctrine.yaml
mappings:
AuditLogBundle:
type: attributeAdd to config/routes/annotations.yaml
auditLog:
resource: '@AuditLogBundle/Resources/config/routes.yaml'php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
php bin/console assets:installUsage
Audit entity must implements
Gupalo\AuditLogBundle\Entity\AwareAuditLogInterfaceFor log audit add dispatch
List:
$this->dispatcher->dispatch(new ListEvent(new AwareAuditLogInterfaceEntity()));View
$this->dispatcher->dispatch(new ViewEvent($entity));Create
$this->dispatcher->dispatch(new CreateEvent($entity));Restore
$this->dispatcher->dispatch(new RestoreEvent($entity));Archive
$this->dispatcher->dispatch(new ArchiveEvent($entity));Export
$this->dispatcher->dispatch(new ExportEvent($entity));base route - /audit-log