Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Projecting events in Laravel (Laravel Live)
Search
Freek Van der Herten
March 03, 2019
Programming
3
580
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
34
Uncharted packages (Laravel Live Denmark)
freekmurze
0
230
I shall define this only once
freekmurze
0
450
An Introduction to Snapshot testing
freekmurze
0
520
Event Sourcing In Laravel
freekmurze
0
270
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
840
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
880
A practical look at multitenancy in Laravel
freekmurze
1
380
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
750
Other Decks in Programming
See All in Programming
AIコーディングエージェント(Gemini)
kondai24
0
180
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
360
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
780
AI時代もSEOを頑張っている話
shirahama_x
0
260
CSC305 Lecture 17
javiergs
PRO
0
300
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
190
Integrating WordPress and Symfony
alexandresalome
0
130
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
420
関数の挙動書き換える
takatofukui
4
770
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
150
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
2k
分散DBって何者なんだ... Spannerから学ぶRDBとの違い
iwashi623
0
180
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
14k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
GitHub's CSS Performance
jonrohan
1032
470k
How STYLIGHT went responsive
nonsquared
100
5.9k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Documentation Writing (for coders)
carmenintech
76
5.2k
[SF Ruby Conf 2025] Rails X
palkan
0
470
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Embracing the Ebb and Flow
colly
88
4.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
What's in a price? How to price your products and services
michaelherold
246
12k
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