Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Auditor

Laravel Auditor Laravel Package

msonowal/laravel-auditor

Laravel Auditor adds simple, Eloquent-friendly auditing to Laravel apps. It records model create, update, and delete events with user attribution and old/new values, then lets you query audit history for compliance, debugging, and activity tracking.

View on GitHub
Deep Wiki
Context7

A simple package to track, record changes for laravel and uses mongodb for storage

Frequently asked questions about Laravel Auditor
How do I install msonowal/laravel-auditor in a Laravel app?
Install the package with Composer using composer require msonowal/laravel-auditor. Then follow the package README for any service provider, configuration, or publish steps. Because it stores audits in MongoDB, make sure your Laravel app has a working MongoDB connection before you start recording changes.
Does Laravel Auditor require MongoDB, or can it use MySQL?
Laravel Auditor uses MongoDB for audit storage, so you should plan for a MongoDB connection in your Laravel app. The provided package context does not indicate a relational database storage driver. If you must store audits in MySQL, compare other Laravel auditing packages or implement a custom solution.
Which Eloquent events does Laravel Auditor record?
Laravel Auditor records model create, update, and delete events. Each audit entry is designed to support compliance checks, debugging, and activity tracking. It also captures user attribution and old/new values so you can review what changed and who made the change.
How does Laravel Auditor track which user made a change?
The package records user attribution with audit entries, so each change can be linked to the authenticated user when the event is captured. Configure user resolution according to the package README and make sure authentication context is available when model events fire. This is important for activity tracking and compliance use cases.
How do I query audit history for a model in Laravel Auditor?
Use the query interface provided by the package to retrieve audit records for a model, then filter by event type, user, or time as needed. The exact API and relationship names should be confirmed in the package README. This audit history is intended for debugging, compliance review, and activity tracking.
Does Laravel Auditor store old and new values on updates?
Yes, Laravel Auditor records old and new values for model changes, including updates. This lets you compare the previous and current state of a record when reviewing audit history. It is useful for debugging unexpected changes and supporting compliance investigations.
Is msonowal/laravel-auditor compatible with Laravel 10 or Laravel 11?
The provided context does not list specific Laravel version constraints, so check the package composer.json and README on GitHub before adopting it. Test installation in a branch against your exact Laravel and PHP versions. If the package is not updated for your version, consider a maintained alternative.
How should I test Laravel Auditor in my application?
Use a dedicated MongoDB test database or connection so audit records do not mix with development or production data. Create, update, and delete test models, then assert that audit entries include the expected event, user attribution, and old/new values. Review the package tests for supported testing patterns and clean up test data between runs.
What are alternatives to Laravel Auditor for model auditing?
Common alternatives include spatie/laravel-activitylog, owen-it/laravel-auditing, and custom Laravel event listeners that write to your own audit table. Choose based on whether you want MongoDB storage, relational storage, built-in UI support, or fine-grained control. Laravel Auditor is focused on simple Eloquent auditing with MongoDB-backed history.
What should I consider before using Laravel Auditor in production?
Plan your MongoDB connection, indexes, backup, and retention strategy before enabling auditing on high-write models. Audit entries can contain sensitive old and new values, so restrict access and consider redacting fields. Also review package maintenance status and test performance under your expected write load.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource