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
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
45
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
760
Highlights Flare codebase (Laracon online)
freekmurze
0
550
Other Decks in Technology
See All in Technology
形式手法特論:コンパイラの「正しさ」は証明できるか? #burikaigi / BuriKaigi 2026
ytaka23
16
6k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
12k
#22 CA × atmaCup 3rd 1st Place Solution
yumizu
1
180
BidiAgent と Nova 2 Sonic から考える音声 AI について
yama3133
2
150
技術選定、下から見るか?横から見るか?
masakiokuda
0
190
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
1
130
Databricks Free Editionで始めるLakeflow SDP
taka_aki
0
100
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
150
AWS re:Invent 2025 を振り返る
kazzpapa3
2
110
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
330
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.6k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.6k
Featured
See All Featured
The Language of Interfaces
destraynor
162
26k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
120
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Visualization
eitanlees
150
16k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
1
350
RailsConf 2023
tenderlove
30
1.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
120
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
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