whitedigital-eu/audit-service
A Laravel package for adding audit trails to your application. Track model changes, user actions, and custom events with configurable storage, straightforward integration, and a clean API for reviewing activity history.
composer require whitedigital-eu/audit-service, then publish the package assets: php artisan vendor:publish --provider="WhiteDigital\AuditService\AuditServiceProvider" (check the provider name in the package's composer.json / README if it differs).whitedigital namespace, so a fresh install will create the table under that schema/prefix. Run php artisan migrate and confirm the audit table exists with the expected name.config/audit-service.php (or similarly named config) first — it typically controls the database connection, table name, and the model/entity used for audit records. This is the file you will touch most often.User or Order) and perform a create/update/delete. Then query the audit table to confirm rows are written with the acting user, event type, and payload.use WhiteDigital\AuditService\Concerns\Auditable; // verify exact namespace
class Order extends Model
{
use Auditable;
}
withoutAuditing/system-actor escape hatch if the package provides one.RefreshDatabase plus the package migrations, and assert on audit rows in feature tests after triggering model events. For unit tests, fake the audit service binding so you don't hit the database.whitedigital and a migration was added. Existing installs upgrading from 0.7.1 must review that migration before running it in production: confirm whether it renames/relocates the table or creates a new one, and whether existing audit rows are preserved or need backfilling. Back up the audit table first — audit data is often the thing you can least afford to lose.migrate:fresh) in a staging database to confirm.whitedigital-eu/audit-service to an exact version and read each changelog before bumping.How can I help you explore Laravel packages today?