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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Freek Van der Herten
January 19, 2021
Technology
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Event Sourcing In Laravel
Freek Van der Herten
January 19, 2021
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
74
Uncharted packages (Laravel Live Denmark)
freekmurze
0
270
I shall define this only once
freekmurze
0
490
An Introduction to Snapshot testing
freekmurze
0
590
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
890
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
940
A practical look at multitenancy in Laravel
freekmurze
1
410
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
800
Highlights Flare codebase (Laracon online)
freekmurze
0
610
Other Decks in Technology
See All in Technology
20260903 Tokyo Jazug Night #62 | Azure エンジニアよ、 その環境は本当にセキュアか?
olivia_0707
1
590
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
190
Hub & Spoke 環境のネットワークルーティングを分解してみる
tsuyataku
1
510
Claude Codeの体系的な理解と知識のフック
oikon48
10
6.6k
推論の観測、できていますか? 〜 Google Cloud Gemini Enterprise Agent Platformで 3つの Gemini モデルを実測して踏んだ、評価の罠 〜
shukob
PRO
0
110
Bet AI Day 2026丨AIを「使う」から、AIが「働く」へ ― LayerXが進める「組織AI」の社会実装
layerx
PRO
2
1.8k
生成AI時代の クレデンシャルとパーミッション設計
nrinetcom
PRO
3
1.5k
「重なり」は迎える側がつくる ― 人もAIエージェントも歓迎するプロダクトエンジニアリング ―
go0517go
PRO
0
200
JAWS-UG初心者支部#88わいわい初心塾(夏休みの宿題やったかGit編)
otsuki
0
110
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
220
bet_ai_day_2026_session02
agenticsec
1
790
KPIだけでは評価できないプロダクトが考えるべき Evalsという第二の評価系 / Beyond KPIs: Evals as a Second Evaluation Framework for Products #PdEConf
aki_iinuma
3
3.3k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Being A Developer After 40
akosma
91
590k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
230
Music & Morning Musume
bryan
47
7.4k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
410
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Code Review Best Practice
trishagee
74
20k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
390
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