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
440
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
30
Uncharted packages (Laravel Live Denmark)
freekmurze
0
220
An Introduction to Snapshot testing
freekmurze
0
510
Event Sourcing In Laravel
freekmurze
0
260
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
830
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
870
A practical look at multitenancy in Laravel
freekmurze
1
370
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
750
Highlights Flare codebase (Laracon online)
freekmurze
0
530
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
450
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
10
8.6k
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
150
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
440
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
270
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
520
Bakuraku E2E Scenario Test System Architecture #bakuraku_qa_study
teyamagu
PRO
0
710
Nitro v3
kazupon
2
280
組織もソフトウェアも難しく考えない、もっとシンプルな考え方で設計する #phpconfuk
o0h
PRO
10
4.1k
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
150
アーキテクチャと考える迷子にならない開発者テスト
irof
7
2.4k
FlutterKaigi 2025 システム裏側
yumnumm
0
860
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8k
A better future with KSS
kneath
239
18k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
KATA
mclloyd
PRO
32
15k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
970
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
The Language of Interfaces
destraynor
162
25k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
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