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
200
An Introduction to Snapshot testing
freekmurze
0
490
Event Sourcing In Laravel
freekmurze
0
250
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
510
Introducing Mailcoach
freekmurze
1
620
Other Decks in Programming
See All in Programming
童醫院敏捷轉型的實踐經驗
cclai999
0
200
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
470
Select API from Kotlin Coroutine
jmatsu
1
190
Create a website using Spatial Web
akkeylab
0
310
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
130
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
590
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
880
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
530
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
330
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.8k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
330
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
410
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
72
4.9k
Gamification - CAS2011
davidbonilla
81
5.3k
Done Done
chrislema
184
16k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
710
Optimising Largest Contentful Paint
csswizardry
37
3.3k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
A designer walks into a library…
pauljervisheath
207
24k
A better future with KSS
kneath
239
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