Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
I shall define this only once
Search
Freek Van der Herten
September 14, 2022
Programming
0
450
I shall define this only once
Freek Van der Herten
September 14, 2022
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
40
Uncharted packages (Laravel Live Denmark)
freekmurze
0
230
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
890
A practical look at multitenancy in Laravel
freekmurze
1
380
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
760
Highlights Flare codebase (Laracon online)
freekmurze
0
550
Other Decks in Programming
See All in Programming
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.4k
Cap'n Webについて
yusukebe
0
150
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4k
Implementation Patterns
denyspoltorak
0
120
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
23k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
AIコーディングエージェント(Manus)
kondai24
0
220
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
440
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
Java 25, Nuevas características
czelabueno
0
120
Grafana:建立系統全知視角的捷徑
blueswen
0
230
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
590
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
How to make the Groovebox
asonas
2
1.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
73
Optimising Largest Contentful Paint
csswizardry
37
3.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Automating Front-end Workflow
addyosmani
1371
200k
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
[SF Ruby Conf 2025] Rails X
palkan
0
640
Transcript
I shall say define this only once
About me Freek Van der Herten Developer at SPATIE @freekmurze
freek.dev mailcoach.app ohdear.app fl areapp.io
Open source ± 300 packages on Packagist ± 360 000
000 downloads total ± 20 000 000 downloads a month
spatie.be/open-source
spatie.be/open-source/postcards
Let’s talk about Laravel Data
At Spatie Big projects Complex data, lots of properties and
relations A lot data structures de fi ned multiple times for di ff erent purposes Form requests, API resources, TypeScript de fi nitions
Laravel Data An easy to use Laravel package Create powerful
data objects A single de fi nition that can be used for multiple purposes Created by Ruben Van Assche 250K downloads
This talk A simple example Real world usage in Flare
Let’s code
In closing
Laravel Data Rich data objects De fi ne a data
structure only once Can replace API resources, Form Requests, … Generating TypeScript de fi nitions
Laravel Data Optional properties Lazy loading of properties Create data
from incoming requests, JSON and objects In fi nitely con fi gurable … and a whole lot more
spatie.be/docs/laravel-data
Laravel Data For everything For only small parts Don’t just
discard the Laravel defaults Do what is best for your team and project
One more thing
Laracon Promo 20% discount on all spatie products, no coupon
needed spatie.be/products Products: Ray, Mailcoach, Laravel Comments, MediaLibrary Pro Courses: Testing Laravel, Laravel Package Training, Laravel Beyond Crud, Writing Readable Laravel, Laravel Event Sourcing
Thank you! freek.dev mailcoach.app spatie.be ohdear.app fl areapp.io