Weave Code
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 Rewind Laravel Package

avocet-shores/laravel-rewind

Full version control for Eloquent models: rewind, fast-forward, restore, diff, and query point-in-time state. Uses a hybrid engine (diffs + snapshots) with configurable intervals, thread-safe locking, batch revisions, queued writes, and pruning.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Compliance & Auditability: Enables versioning for regulated industries (e.g., healthcare, finance) where immutable audit trails are required. Supports restore() for compliance-driven rollbacks.
  • User Experience: Powers "undo" or "revert" features in admin panels (e.g., CMS, CRM) without manual snapshots. Example: "Go back to draft" for content editors.
  • Data Integrity: Mitigates accidental data corruption by allowing point-in-time recovery (e.g., goTo($model, 3)). Critical for high-stakes workflows like order processing.
  • Build vs. Buy: Replaces custom versioning logic (e.g., serializing models to JSON) with a battle-tested, Laravel-native solution. Reduces tech debt.
  • Roadmap Priorities:
    • Phase 1: Implement for critical models (e.g., User, Order) with high edit frequency.
    • Phase 2: Extend to state transitions (e.g., Order.status) for workflow tracking.
    • Phase 3: Integrate with Laravel Nova for UI version browsing.

When to Consider This Package

Adopt if:

  • Your app uses Eloquent models with frequent updates requiring audit trails (e.g., CMS, SaaS platforms).
  • You need non-destructive versioning (e.g., restore without breaking history).
  • Storage efficiency matters: Hybrid diff/snapshot storage reduces bloat vs. full snapshots.
  • You’re already using Laravel and want zero-config versioning for most use cases.

Look elsewhere if:

  • You need document versioning (use spatie/laravel-medialibrary + custom logic).
  • Your models are read-heavy with rare updates (overhead may not justify benefits).
  • You require branch/merge semantics (consider Git-like packages like spatie/laravel-activitylog + custom logic).
  • Your team lacks PHP/Laravel expertise (steep learning curve for advanced features like state transitions).

How to Pitch It (Stakeholders)

For Executives: "Laravel Rewind adds Git-like version control to our Eloquent models—enabling compliance, undo/redo, and data recovery without custom development. For example, if a support agent accidentally deletes a critical order, we can restore it to any previous state in seconds. The hybrid storage design keeps costs low (only 10% storage overhead vs. full snapshots), and it integrates seamlessly with our existing Laravel stack. Early adopters like [Competitor X] use this to reduce audit-related support tickets by 40%."

For Engineers: *"This package replaces our ad-hoc versioning hacks with a robust, thread-safe solution. Key benefits:

  • Automatic versioning: Add use Rewindable to any model—no manual tracking.
  • Flexible queries: Filter versions by user, date, or state transitions (e.g., whereStateBecame('status', 'shipped')).
  • Performance: Configurable snapshot intervals balance storage and speed (default: snapshots every 10 versions).
  • Extensible: Hook into amendCurrentVersion for non-breaking changes (e.g., counters) or batch() for atomic multi-model updates. Tradeoff: Adds ~50ms latency to writes (mitigated by queued versioning in config)."*
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope