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
400
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
200
An Introduction to Snapshot testing
freekmurze
0
490
Event Sourcing In Laravel
freekmurze
0
240
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
800
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
850
A practical look at multitenancy in Laravel
freekmurze
1
350
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
720
Highlights Flare codebase (Laracon online)
freekmurze
0
500
Introducing Mailcoach
freekmurze
1
620
Other Decks in Programming
See All in Programming
型安全なDrag and Dropの設計を考える
yudppp
5
700
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
4
500
RubyKaigiで得られる10の価値 〜Ruby話を聞くことだけが RubyKaigiじゃない〜
tomohiko9090
0
130
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
170
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
220
Efficiency and Rock 'n’ Roll (Really!)
hollycummins
0
660
"使いづらい" をリバースエンジニアリングする UI の読み解き方
rebase_engineering
0
130
がんばりすぎないコーディングルール運用術
tsukakei
1
210
Practical Domain-Driven Design - Workshop at NDC 2025
mufrid
0
140
SODA - FACT BOOK
sodainc
1
320
セキュリティマネジャー廃止とクラウドネイティブ型サンドボックス活用
kazumura
1
140
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
Featured
See All Featured
Scaling GitHub
holman
459
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
GitHub's CSS Performance
jonrohan
1031
460k
Unsuck your backbone
ammeep
671
58k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
860
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
The Cost Of JavaScript in 2023
addyosmani
49
8.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