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
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
66
Uncharted packages (Laravel Live Denmark)
freekmurze
0
260
I shall define this only once
freekmurze
0
480
An Introduction to Snapshot testing
freekmurze
0
580
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
880
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
920
A practical look at multitenancy in Laravel
freekmurze
1
410
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
790
Highlights Flare codebase (Laracon online)
freekmurze
0
590
Other Decks in Technology
See All in Technology
Build with AI 楽しむ!アイデアを形に
norikotakiguchi
0
100
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
340
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
280
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/3 - 2026/5
oracle4engineer
PRO
1
210
【Gen-AX】20260530開催_JJUG CCC 2026 Spring
genax
0
430
Djangoユーザが知っ得なPostgreSQL機能 - 設計の選択肢を増やす / Djang-use-PostgreSQL
soudai
PRO
0
200
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
1.8k
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.7k
Diagnosing performance problems without the guesswork
elenatanasoiu
0
170
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
0
180
「気づいたら仕事が終わっている」バクラクAIエージェント本番運用の裏側 / layerx-bakuraku-aie2026
yuya4
19
11k
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
So, you think you're a good person
axbom
PRO
2
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
390
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
160
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Odyssey Design
rkendrick25
PRO
2
690
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
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