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 (Full Stack Ghent)
Search
Freek Van der Herten
April 10, 2019
Programming
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Event Sourcing in Laravel (Full Stack Ghent)
Freek Van der Herten
April 10, 2019
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
Event Sourcing In Laravel
freekmurze
0
290
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
Other Decks in Programming
See All in Programming
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
120
The NotImplementedError Problem in Ruby
koic
1
650
Oxcを導入して開発体験が向上した話
yug1224
4
290
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
170
今さら聞けないCancellationToken
htkym
0
220
Agentic UI
manfredsteyer
PRO
0
110
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
850
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
230
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.7k
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
300
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
YesSQL, Process and Tooling at Scale
rocio
174
15k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Transcript
Getting started with event sourcing in Laravel
About me Freek Van der Herten Partner & developer at
Spatie @freekmurze murze.be ohdear.app
Spatie Laravel, front-end development Since 2003 9 awesome human beings
Open Source Software
We create a lot of it ± 200 packages on
Packagist ± 2,000,000 downloads a month ± 30,000,000 total downloads All Postcardware!
Highlights Popular laravel-backup laravel-medialibrary laravel-permission New laravel-query-builder laravel-blade-x
https://spatie.be/open-source
https://spatie.be/open-source/postcards
Let's talk about event sourcing
Talk overview Theory Projectors demo Aggregates demo
Theory
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 fire off 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 Projector
Laravel Event Projector Package made by Spatie Aggregates, Projectors &
Reactors Beautifully integrated into Laravel Easy to get started with
https://docs.spatie.be/laravel-event-projector
Demo
Aggregates
None
None
None
None
None
None
Demo
In closing
Summary Laravel Event Projector Easy to use package to get
started with event sourcing Projectors Replay capabilities Aggregates
Writes are harder, reads are easier
Event sourcing makes the easy things harder… …and the harder
things easier — Frank De Jonge
Larabank github.com/spatie/larabank-traditional github.com/spatie/larabank-event-projector github.com/spatie/larabank-event-projector-aggregates github.com/spatie/larabank-eventsauce
Resources kickstarter.engineering/event-sourcing-made-simple-4a2625113224 github.com/spatie/laravel-event-projector github.com/eventsaucephp/eventsauce github.com/prooph
Thank you! speakerdeck.com/freekmurze/event-sourcing-full-stack-ghent spatie.be/open-source murze.be ohdear.app