Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Projecting events in Laravel (Laravel Live)
Search
Freek Van der Herten
March 03, 2019
Programming
630
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Projecting events in Laravel (Laravel Live)
Freek Van der Herten
March 03, 2019
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
77
Uncharted packages (Laravel Live Denmark)
freekmurze
0
270
I shall define this only once
freekmurze
0
500
An Introduction to Snapshot testing
freekmurze
0
600
Event Sourcing In Laravel
freekmurze
0
300
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
900
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
950
A practical look at multitenancy in Laravel
freekmurze
1
420
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
810
Other Decks in Programming
See All in Programming
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
200
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
280
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
2
710
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.5k
残高管理から台帳サービスへの進化
artoy
1
210
Modernizing iOS Apps
seyfoyun
0
120
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.2k
contenteditable と日本語入力に向き合う
colorful12
0
220
sbt 2.0: takeoff
eed3si9n
0
170
ActionController meets Protocol Buffers
sorah
1
700
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
210
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
Skip the Path - Find Your Career Trail
mkilby
1
260
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
370
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
How to build a perfect <img>
jonoalderson
1
6.2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
610
GitHub's CSS Performance
jonrohan
1033
470k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
810
Navigating Team Friction
lara
192
16k
We Are The Robots
honzajavorek
0
400
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