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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
480
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
200
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
390
(技術的には)社内システムもOKなブラウザエージェントを作ってみた!
har1101
0
270
Cloud Runでコロプラが挑む 生成AI×ゲーム『神魔狩りのツクヨミ』の裏側
colopl
0
140
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.6k
AWS DevOps Agent x ECS on Fargate検証 / AWS DevOps Agent x ECS on Fargate
kinunori
2
180
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
1.1k
Agile Leadership Summit Keynote 2026
m_seki
1
670
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
Webhook best practices for rock solid and resilient deployments
glaforge
2
310
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
200
Building Adaptive Systems
keathley
44
2.9k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
58
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
98
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
For a Future-Friendly Web
brad_frost
182
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Google's AI Overviews - The New Search
badams
0
910
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