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
480
0
Share
I shall define this only once
Freek Van der Herten
September 14, 2022
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
66
Uncharted packages (Laravel Live Denmark)
freekmurze
0
260
An Introduction to Snapshot testing
freekmurze
0
570
Event Sourcing In Laravel
freekmurze
0
280
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
880
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
920
A practical look at multitenancy in Laravel
freekmurze
1
400
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
790
Highlights Flare codebase (Laracon online)
freekmurze
0
590
Other Decks in Programming
See All in Programming
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
Moments When Things Go Wrong
aurimas
3
130
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
OSもどきOS
arkw
0
370
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1k
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
340
ふつうのFeature Flag実践入門
irof
7
3.4k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
410
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
430
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.9k
Oxlintのカスタムルールの現況
syumai
5
930
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
The SEO Collaboration Effect
kristinabergwall1
1
470
Building the Perfect Custom Keyboard
takai
2
780
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
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