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

Audit Api Bundle Laravel Package

acrnogor/audit-api-bundle

A Symfony bundle for adding audit trail capabilities and API access to PHP applications. It helps record changes, expose audit data through endpoints, and integrate auditing into existing Symfony services and workflows.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the package with Composer, publish its config and migrations, then run php artisan migrate.
  • Look first at the package config (auditable models, storage connection, retention settings) and at php artisan audit:logs --help to see available filters.
  • Start with a single model: add the package’s auditing trait/interface, perform a create/update/delete, then run php artisan audit:logs and confirm the Changes column shows a readable diff.
  • In v0.9.12 the Changes column is pretty-printed JSON, so the command is now a practical first-stop debugging tool for “what changed and when” without opening the database or dumping raw JSON.

Implementation Patterns

  • Use audit:logs as the default inspection workflow: run it after reproducing a bug or deploying, filter by model/date/user where supported, and read the Changes column directly.
  • For deep investigation, redirect output to a file and pipe it through jq or your log tooling; the pretty-printed diffs are easier to scan but still benefit from structured post-processing.
  • Keep auditing enabled on models that carry business-critical state, and use the command as a lightweight regression check in staging after seeders or migrations.
  • When reviewing a change set, compare the Changes column against the event type (created/updated/deleted) and the audit timestamp; the diff is display-only in v0.9.12, so the underlying stored payload remains the source of truth.
  • If the package supports custom audit resolvers or mutators, keep diff formatting concerns out of them; let the command handle presentation so exports and API consumers still receive raw JSON.

Gotchas and Tips

  • Pretty-printed JSON can wrap or truncate in narrow terminals; use a wider terminal, redirect to a file, or disable ANSI output when copying diffs into tickets.
  • Large updates produce large diffs; filter the command output by model, record ID, or date range before inspecting, otherwise the Changes column becomes noisy.
  • The v0.9.12 change affects display only. Existing audit rows will render pretty-printed automatically, but stored JSON is unchanged—do not expect new columns or schema changes.
  • If Changes is empty, verify the model actually fires audit events, the trait/interface is applied, and the audit driver is configured; the command can only show what was recorded.
  • Check JSON casting on the audit model if diffs appear as escaped strings rather than structured JSON; the pretty-printer can only format valid decoded JSON.
  • Use the command’s exit behavior carefully in scripts: it is an inspection tool, not a validation command, so assert on database state or exported JSON rather than parsing human-readable output.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager