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
dchart: charts from deck markup
ajstarks
3
1k
Fluid Templating in TYPO3 14
s2b
0
130
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
250
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
310
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
470
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
CSC307 Lecture 02
javiergs
PRO
1
780
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
83
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
220
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
Why Our Code Smells
bkeepers
PRO
340
58k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
How to Ace a Technical Interview
jacobian
281
24k
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