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
460
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
51
Uncharted packages (Laravel Live Denmark)
freekmurze
0
240
An Introduction to Snapshot testing
freekmurze
0
530
Event Sourcing In Laravel
freekmurze
0
270
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
850
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
890
A practical look at multitenancy in Laravel
freekmurze
1
390
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
770
Highlights Flare codebase (Laracon online)
freekmurze
0
570
Other Decks in Programming
See All in Programming
高速開発のためのコード整理術
sutetotanuki
1
400
dchart: charts from deck markup
ajstarks
3
1k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
470
Basic Architectures
denyspoltorak
0
680
Raku Raku Notion 20260128
hareyakayuruyaka
0
340
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
CSC307 Lecture 09
javiergs
PRO
1
840
CSC307 Lecture 10
javiergs
PRO
1
660
Oxlintはいいぞ
yug1224
5
1.3k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
720
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
140
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
83
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Leo the Paperboy
mayatellez
4
1.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
94
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
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