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
I shall define this only once
Search
Freek Van der Herten
September 14, 2022
Programming
0
410
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 (Laravel Live Denmark)
freekmurze
0
210
An Introduction to Snapshot testing
freekmurze
0
500
Event Sourcing In Laravel
freekmurze
0
250
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
810
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
860
A practical look at multitenancy in Laravel
freekmurze
1
350
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
730
Highlights Flare codebase (Laracon online)
freekmurze
0
520
Introducing Mailcoach
freekmurze
1
620
Other Decks in Programming
See All in Programming
管你要 trace 什麼、bpftrace 用下去就對了 — COSCUP 2025
shunghsiyu
0
390
[DevinMeetupTokyo2025] コード書かせないDevinの使い方
takumiyoshikawa
2
280
Jakarta EE Meets AI
ivargrimstad
0
670
Webinar: AI-Powered Development: Transformiere deinen Workflow mit Coding Tools und MCP Servern
danielsogl
0
110
LLMは麻雀を知らなすぎるから俺が教育してやる
po3rin
3
2.1k
Portapad紹介プレゼンテーション
gotoumakakeru
1
120
STUNMESH-go: Wireguard NAT穿隧工具的源起與介紹
tjjh89017
0
350
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
120
#QiitaBash TDDで(自分の)開発がどう変わったか
ryosukedtomita
1
360
SwiftでMCPサーバーを作ろう!
giginet
PRO
2
230
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
570
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.1k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Invisible Side of Design
smashingmag
301
51k
A designer walks into a library…
pauljervisheath
207
24k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Adopting Sorbet at Scale
ufuk
77
9.5k
The Cult of Friendly URLs
andyhume
79
6.5k
Embracing the Ebb and Flow
colly
86
4.8k
Designing Experiences People Love
moore
142
24k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
450
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
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