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
63
Uncharted packages (Laravel Live Denmark)
freekmurze
0
260
An Introduction to Snapshot testing
freekmurze
0
560
Event Sourcing In Laravel
freekmurze
0
280
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
870
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
910
A practical look at multitenancy in Laravel
freekmurze
1
400
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
780
Highlights Flare codebase (Laracon online)
freekmurze
0
590
Other Decks in Programming
See All in Programming
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
140
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3k
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
170
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
410
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.8k
AIを導入する前にやるべきこと
negima
2
340
空間オーディオの活用
objectiveaudio
0
150
Explore CoroutineScope
tomoeng11
0
180
Agent Skills を社内で育てる仕組み作り
jackchuka
1
1.8k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
200
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
Odyssey Design
rkendrick25
PRO
2
610
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Mind Mapping
helmedeiros
PRO
1
190
Visualization
eitanlees
150
17k
Accessibility Awareness
sabderemane
1
110
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
350
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
340
Optimizing for Happiness
mojombo
378
71k
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