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
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
150
Bet AI Day 2026丨AIによって本質に戻るシステムリスク管理
layerx
PRO
0
610
Genie Code ワークショップ 応用編 / Genie-Code-Workshop-advanced
databricksjapan
PRO
0
260
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
150
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
560
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
140
Point Cloud as a Foreign Language for Multi-modal Large Language Model
takmin
0
360
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
2
1.7k
IDperturb: Enhancing Variation in Synthetic Face Generation via Angular Perturbation
sansantech
PRO
0
110
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
610
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
210
Nav2、Nav3 ... はたまた自作?〜 作って理解する Nav3 の設計意図 〜 / Nav2, Nav3 ... or Build Your Own? — Understanding Nav3's design intent by building it from scratch
yanzm
0
180
Featured
See All Featured
We Are The Robots
honzajavorek
0
330
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
480
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
From π to Pie charts
rasagy
0
350
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
390
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
430
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
460
Site-Speed That Sticks
csswizardry
13
1.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
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