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
Projecting events in Laravel (Laravel Live)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Freek Van der Herten
March 03, 2019
Programming
3
590
Projecting events in Laravel (Laravel Live)
Freek Van der Herten
March 03, 2019
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
55
Uncharted packages (Laravel Live Denmark)
freekmurze
0
250
I shall define this only once
freekmurze
0
460
An Introduction to Snapshot testing
freekmurze
0
540
Event Sourcing In Laravel
freekmurze
0
280
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
850
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
900
A practical look at multitenancy in Laravel
freekmurze
1
390
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
770
Other Decks in Programming
See All in Programming
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
520
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
290
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
Event Storming
hschwentner
3
1.3k
CSC307 Lecture 13
javiergs
PRO
0
310
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
110
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
210
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
480
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
150
CSC307 Lecture 15
javiergs
PRO
0
220
Featured
See All Featured
How to make the Groovebox
asonas
2
2k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
230
Why Our Code Smells
bkeepers
PRO
340
58k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
The browser strikes back
jonoalderson
0
760
Side Projects
sachag
455
43k
Navigating Team Friction
lara
192
16k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
130
A better future with KSS
kneath
240
18k
Transcript
Projecting events in Laravel
About me Freek Van der Herten Partner & developer at
Spatie @freekmurze https://murze.be https://ohdear.app
Spatie Since 2003 Websites, applications and webshops Team 9 awesome
human beings Specialisation Laravel, front-end development
Open Source Software
We create a lot of it ± 200 packages on
Packagist ± 2,000,000 downloads a month ± 25,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 projecting events
Talk overview Theory Laravel Event Projector 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
Using projectors The application will fire off events Events will
get written in a dedicated store Events are passed to classes that can handle them
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
Projecting events Auditing requirements Extra reports needed There is some
setup required
Laravel Event Projector
Laravel Event Projector It's not full event sourcing, it focuses
on projections Beautifully integrated into Laravel Easy to get started with
https://docs.spatie.be/laravel-event-projector
Demo
In closing
Summary Easy to use package to get started with projections
Hooks into Laravel's native events Replay capabilities Writes are harder, reads are easier
Resources https://kickstarter.engineering/event-sourcing-made-simple-4a2625113224 https://dev.to/barryosull/event-sourcing-what-it-is-and-why-its-awesome https://www.youtube.com/watch?v=28jmTeN3VYc https://github.com/eventsauce
Thank you! https://speakerdeck.com/freekmurze/projecting-events-in-laravel https://spatie.be/open-source https://murze.be https://ohdear.app https://fullstackeurope.com