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
820
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
860
A practical look at multitenancy in Laravel
freekmurze
1
360
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
730
Highlights Flare codebase (Laracon online)
freekmurze
0
520
Introducing Mailcoach
freekmurze
1
630
Other Decks in Programming
See All in Programming
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
260
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
19
10k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
100
コンテキストエンジニアリング Cursor編
kinopeee
1
760
TDD 実践ミニトーク
contour_gara
1
290
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
480
ソフトウェアテスト徹底指南書の紹介
goyoki
1
140
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
AIコーディングAgentとの向き合い方
eycjur
0
260
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
310
はじめてのMaterial3 Expressive
ym223
2
160
Featured
See All Featured
Done Done
chrislema
185
16k
The Cult of Friendly URLs
andyhume
79
6.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Navigating Team Friction
lara
189
15k
Git: the NoSQL Database
bkeepers
PRO
431
66k
RailsConf 2023
tenderlove
30
1.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
A designer walks into a library…
pauljervisheath
207
24k
Statistics for Hackers
jakevdp
799
220k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Into the Great Unknown - MozCon
thekraken
40
2k
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