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
480
0
Share
I shall define this only once
Freek Van der Herten
September 14, 2022
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
65
Uncharted packages (Laravel Live Denmark)
freekmurze
0
260
An Introduction to Snapshot testing
freekmurze
0
570
Event Sourcing In Laravel
freekmurze
0
280
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
880
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
920
A practical look at multitenancy in Laravel
freekmurze
1
400
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
790
Highlights Flare codebase (Laracon online)
freekmurze
0
590
Other Decks in Programming
See All in Programming
要はバランスからの卒業 #yumemi_grow
kajitack
0
190
Cloudflare で始める Data Platform
ta93abe
0
290
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
850
inferと仲良くなる10分間
ryokatsuse
1
240
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
350
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
270
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
570
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
110
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
200
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
320
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
110
cloudnative conference 2026 flyle
azihsoyn
1
200
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
340
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
The SEO identity crisis: Don't let AI make you average
varn
0
470
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
450
Statistics for Hackers
jakevdp
799
230k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
300
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
190
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
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