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
390
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
190
An Introduction to Snapshot testing
freekmurze
0
480
Event Sourcing In Laravel
freekmurze
0
240
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
790
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
830
A practical look at multitenancy in Laravel
freekmurze
1
340
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
710
Highlights Flare codebase (Laracon online)
freekmurze
0
480
Introducing Mailcoach
freekmurze
1
610
Other Decks in Programming
See All in Programming
Make Parsers Compatible Using Automata Learning
makenowjust
2
5.4k
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
71
17k
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
170
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
550
State of Namespace
tagomoris
4
1.9k
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
2
780
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6.5k
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
120
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
0
140
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
300
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
1.3k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.1k
Speed Design
sergeychernyshev
29
900
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Six Lessons from altMBA
skipperchong
27
3.7k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
740
Agile that works and the tools we love
rasmusluckow
328
21k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
How GitHub (no longer) Works
holman
314
140k
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