Event Sourcing in Laravel with EventSauce
summary
Uses the EventSauce library and a Laravel adapter to implement event sourcing for a GitHub-style pull-request aggregate with events stored in domain_message, emits commands that validate business rules and record events, then replays them to rebuild state; includes projections for read models and process managers for one-time actions, provides BDD-style tests and code generation for commands/events, claims single-query replay performance, supports snapshotting and time travel, and recommends starting with a simple process rather than short-lived apps.
AI-written summary · about
chapters (12)
- 0:00Intro
- 2:18Domain and Process
- 3:42What is Event Sourcing
- 7:07Benefits of Event Sourcing
- 8:45Stateful vs Event Sourcing
- 9:52Aggregate Roots
- 12:09Handling Commands
- 17:13Event Store
- 17:55Events
- 23:09Testing
- 25:42Summary
- 30:13Reading material
related talks
40mEvent Sourcing with Laravel
32mEvent Sourcing in Laravel
43mAdding Event Sourcing to an existing PHP project (for the right reasons)
58mPHP + ES + CQRS + DDD = ? An integrated strategy
41mAdding Event Sourcing to an existing PHP project (for the right reasons)
25mCQRS and Event Sourcing: May the Event Be with You
33mPut Verbs in your database
02h 53mPractical design patterns in PHP (Part 3)
