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

Elogquent Laravel Package

luissantiago/elogquent

Elogquent is a Laravel package for logging Eloquent model events. Add its trait to models to automatically record create, update, and delete actions—including changed attributes—for simple auditing and activity history.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Audit trail / compliance features. Elogquent gives you a per-model change log (old value → new value, timestamped) in a dedicated history table. That directly unlocks customer-facing requirements like "who changed this record, when, and from what" — the backbone of SOC 2 / ISO 27001 evidence, financial-record audit, and enterprise security questionnaires.
  • Build vs. buy for change history. The capability is genuinely small (an observer plus a history table), so the decision is not "can we build it" but "do we want to own schema design, query ergonomics, and edge cases." A package like this is a 1–3 day head start, not a 3-month platform bet. Treat it as an accelerator for a v1, not as infrastructure you're locked into.
  • Roadmap sequencing for "undo," "activity feed," and "diff" features. A history table is the prerequisite for several adjacent features: revert-to-previous-version, an in-app activity timeline on a record, and "what changed since you last looked" notifications. If any of those are on the roadmap within 2–3 quarters, capturing history now avoids a painful backfill later.
  • Field-level change analytics. Because it records only configured attributes, you can scope capture to the handful of fields that matter (deal stage, price, owner, status) and later mine them for operational insight — time-in-stage, reassignment frequency, price drift — without a data-warehouse project.
  • Scoping decisions to make with engineering. Which models and which attributes get tracked, whether the acting user is recorded, retention window, and whether history is exposed to end users or internal-only. These are product calls, not implementation details, and Elogquent's configuration surface is where they get expressed.
  • Risk to price in. Adoption is very low (19 stars). That doesn't make it wrong — Apache-2.0 and a focused scope make it low-risk to try — but it does mean you should budget for the possibility of forking it or replacing it. Decision: adopt behind an internal interface so the vendor choice is reversible.

When to Consider This Package

Good fit when:

  • You need attribute-level history on a defined set of Eloquent models and want it isolated in its own table rather than mixed into general application logs.
  • You want per-model configuration of which attributes are tracked — capturing everything is both a performance and a privacy problem, and this package's opt-in model matches that reality.
  • Your team is Laravel-native and comfortable owning a small dependency; the integration cost is low and the mental model (model events → history rows) is obvious to any Laravel dev.
  • You're in a pre-compliance or early-enterprise-sales phase and need a credible audit story fast, with the option to harden later.
  • You want the history data in your own database, queryable with Eloquent, rather than shipped to an external logging vendor.

Look elsewhere (or build in-house) when:

  • You need mass updates, raw query-builder writes, or queued bulk imports captured — Eloquent model events don't fire on those paths, so coverage will have holes that must be closed by convention or by adding DB-level triggers. This is the single biggest correctness gap to validate before committing.
  • You need strict, tamper-evident audit (append-only guarantees, hash chaining, immutability, WORM storage). A plain history table can be updated or deleted by anyone with DB access — insufficient for regulated audit in many jurisdictions.
  • You want a mature ecosystem and community support. spatie/laravel-activitylog and owen-it/laravel-auditing have far larger user bases, more blog coverage, and more Stack Overflow answers — materially lower onboarding and hiring cost. Evaluate against these first.
  • You need actor/IP/request-context capture, multi-tenancy, retention policies, or a UI out of the box. Confirm what's included; anything missing becomes your build cost.
  • The history data includes PII or sensitive fields. Recording old values means "deleted" data persists in history — you need a redaction/exclusion strategy and a GDPR erasure answer before launch, not after.
  • The package's maintenance signal is thin for your risk tolerance. With 19 stars and an apparently single maintainer, put a fork-and-own plan in the ADR. Pin the exact version; avoid floating constraints.

Due-diligence checklist before saying yes: verify old/new value storage format, whether the acting user and a request/correlation ID are recorded, transaction and failure behavior (does a failed history write roll back the model write?), write-path performance overhead on high-volume tables, index coverage for the queries you'll actually run (by model, by ID, by date), migration and upgrade story, and test coverage in the repo.

How to Pitch It (Stakeholders)

To executives: We can ship a credible "who changed what, when" audit capability in days instead of weeks, in our own database, at effectively zero licensing cost (Apache-2.0). It's the foundation for compliance readiness and for follow-on features like record history views and revert. The risk is contained: adoption is small, so we'll isolate it behind an internal interface and pin the version — if we outgrow it, swapping it out is a contained change, not a rewrite. Decision needed: approve a short spike (roughly 2–3 days) to validate coverage of bulk writes and confirm retention/privacy policy, then green-light.

To engineering: Small, focused package — observes Eloquent model events and writes configured attribute deltas to a separate history table. Low integration cost, obvious mental model, no external service. Ask: confirm it handles your write paths (watch mass updates and bulk imports, which bypass events), confirm actor/timestamp/correlation-ID capture, and wrap it behind an internal ChangeLog interface so we're not coupled to a 19-star dependency. Benchmark append overhead on the highest-write table before rollout, and agree a redaction list for sensitive attributes so we don't quietly build a PII archive. Compare against spatie/laravel-activitylog and owen-it/laravel-auditing in the spike — if either covers bulk writes and actor context better, take it; the goal is the capability, not this specific package.

The one-line framing: cheap, reversible, and unlocks compliance plus three roadmap features — approve the spike, not the three-year commitment.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle