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
62
Uncharted packages (Laravel Live Denmark)
freekmurze
0
250
An Introduction to Snapshot testing
freekmurze
0
560
Event Sourcing In Laravel
freekmurze
0
280
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
860
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
910
A practical look at multitenancy in Laravel
freekmurze
1
400
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
780
Highlights Flare codebase (Laracon online)
freekmurze
0
580
Other Decks in Programming
See All in Programming
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
220
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
280
Swift Concurrency Type System
inamiy
1
540
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
290
Running Swift without an OS
kishikawakatsumi
0
850
Agentic Elixir
whatyouhide
0
390
Back to the roots of date
jinroq
0
350
実践CRDT
tamadeveloper
0
590
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
660
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
140
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
110
Coding as Prompting Since 2025
ragingwind
0
840
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
Context Engineering - Making Every Token Count
addyosmani
9
840
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
110
GitHub's CSS Performance
jonrohan
1032
470k
The agentic SEO stack - context over prompts
schlessera
0
760
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
54k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
160
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
180
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
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