$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Event Sourcing In Laravel
Search
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
40
Uncharted packages (Laravel Live Denmark)
freekmurze
0
230
I shall define this only once
freekmurze
0
450
An Introduction to Snapshot testing
freekmurze
0
520
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
840
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
890
A practical look at multitenancy in Laravel
freekmurze
1
380
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
760
Highlights Flare codebase (Laracon online)
freekmurze
0
550
Other Decks in Technology
See All in Technology
Claude Codeを使った情報整理術
knishioka
11
6.7k
障害対応訓練、その前に
coconala_engineer
0
200
AWS re:Invent 2025~初参加の成果と学び~
kubomasataka
1
190
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
710
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
190
AI との良い付き合い方を僕らは誰も知らない
asei
0
270
Kiro を用いたペアプロのススメ
taikis
4
1.9k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
投資戦略を量産せよ 2 - マケデコセミナー(2025/12/26)
gamella
0
440
"人"が頑張るAI駆動開発
yokomachi
1
610
【開発を止めるな】機能追加と並行して進めるアーキテクチャ改善/Keep Shipping: Architecture Improvements Without Pausing Dev
bitkey
PRO
1
130
アラフォーおじさん、はじめてre:Inventに行く / A 40-Something Guy’s First re:Invent Adventure
kaminashi
0
160
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
Rails Girls Zürich Keynote
gr2m
95
14k
My Coaching Mixtape
mlcsv
0
13
What's in a price? How to price your products and services
michaelherold
246
13k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
580
Speed Design
sergeychernyshev
33
1.4k
The Curse of the Amulet
leimatthew05
0
4.8k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
100
YesSQL, Process and Tooling at Scale
rocio
174
15k
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