Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Event Sourcing In Laravel
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Freek Van der Herten
January 19, 2021
Technology
0
270
Event Sourcing In Laravel
Freek Van der Herten
January 19, 2021
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
52
Uncharted packages (Laravel Live Denmark)
freekmurze
0
240
I shall define this only once
freekmurze
0
460
An Introduction to Snapshot testing
freekmurze
0
530
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
850
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
890
A practical look at multitenancy in Laravel
freekmurze
1
390
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
770
Highlights Flare codebase (Laracon online)
freekmurze
0
570
Other Decks in Technology
See All in Technology
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
320
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
260
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
610
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
130
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
680
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.4k
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
480
Cosmos World Foundation Model Platform for Physical AI
takmin
0
980
AWS Network Firewall Proxyを触ってみた
nagisa53
1
240
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
210
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
0
180
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
170
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
260
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
460
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
KATA
mclloyd
PRO
34
15k
The Pragmatic Product Professional
lauravandoore
37
7.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Typedesign – Prime Four
hannesfritz
42
3k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Bash Introduction
62gerente
615
210k
Transcript
Event Sourcing in Laravel
About me Freek Van der Herten @freekmurze spatie.be freek.dev ohdear.app
f l areapp.io
Open Source Software
spatie.be/open-source
spatie.be/videos
Let's talk about event sourcing
Talk overview Theory Projectors demo Aggregates demo
Traditional application Write data in database An update means overwriting
the old data The old data cannot be accessed anymore
APPLICATION DATABASE TABLE value X
APPLICATION DATABASE TABLE value X value Y
Event Sourced Application The application will f i re o
f f events Events will get written in a dedicated store Events are passed to consumers that create projections Aggregate, Aggregate Root...
APP EVENTS Event Event 1
APP EVENTS Event Event 1 Event 2
APP EVENTS Event Event 1 Event 2 Event 3
APP CONSUMER EVENTS PROJECTION Event Event 1 Event 2 Event
3
APP CONSUMER CONSUMER 2 EVENTS PROJECTION Event Event 1 Event
2 Event 3 ANOTHER PROJECTION
APP CONSUMER CONSUMER 2 EVENTS PROJECTION Event Event 1 Event
2 Event 3 ANOTHER PROJECTION
APP CONSUMER CONSUMER 2 EVENTS PROJECTION Event Event 1 Event
2 Event 3 Event 4 ANOTHER PROJECTION
Event Sourced Application Auditing requirements Extra reports needed Recording the
unhappy path There is some setup required
Laravel Event Sourcing
Laravel Event Sourcing Package made by Spatie Aggregates, Projectors &
Reactors Beautifully integrated into Laravel Easy to get started with
Demo
Aggregates
None
None
None
None
None
None
Demo
Wrapping up
spatie.be/docs/laravel-event-sourcing
Packages spatie.be/docs/laravel-event-sourcing eventsauce.io
Event sourcing makes the easy things harder… …and the harder
things easier — Frank De Jonge
Course eventsourcery.com
Larabank github.com/spatie/larabank-traditional github.com/spatie/larabank-event-projector github.com/spatie/larabank-event-projector-aggregates
One more thing
spatie.be/event-sourcing The basics of event sourcing Best practices Laravel speci
f i c examples Event sourced cart ETA July 2021
Thank you! spatie.be/docs/laravel-event-sourcing spatie.be/products (only this week 25 % discount
on everything) ohdear.app