Audit Changes Logs

This module logs all the actions by the users. Every time someone adds/updates/deletes an entry, it will log the action in database table audit_logs, which will be shown in a separate menu item (see above).

For that, we use Model Observer functionality of Laravel.

Video demo of a module:

How does the result look in QuickAdminPanel code?

We create a new database table with migration:

Then we create a new model called app/AuditLog.php:

Then we create one new Trait class, with this code. app/Traits/Auditable.php

Then we attach this trait for CRUD model: app/Project.php:

Finally, we create a CRUD called Audit Logs to just view the table. resources/views/admin/auditLogs/index.blade.php

You can easily customize the module after download by adding more fields or more logic in the files above.

How to install/use the module?

All you need to do is go to your panel's Modules menu item, find the module in the list and click Install.

Then for every CRUD you may specify to enable Audit Logs for that CRUD.

How to Customize the Module

More information

Last updated