Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
I shall define this only once
Search
Freek Van der Herten
September 14, 2022
Programming
510
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
I shall define this only once
Freek Van der Herten
September 14, 2022
Transcript
18 slides
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
More Decks by Freek Van der Herten
See All by Freek Van der Herten
Uncharted packages (ode aan de code)
freekmurze
0
82
Uncharted packages (Laravel Live Denmark)
freekmurze
0
280
An Introduction to Snapshot testing
freekmurze
0
610
Event Sourcing In Laravel
freekmurze
0
300
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
910
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
960
A practical look at multitenancy in Laravel
freekmurze
1
420
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
810
Highlights Flare codebase (Laracon online)
freekmurze
0
620
Other Decks in Programming
See All in Programming
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
200
GraphQL の onError と Nullability のこれから
quramy
0
220
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
140
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.4k
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.1k
Debian JP Projectのサーバー構成
uwabami
1
130
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
220
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
620
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
400
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
330
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Done Done
chrislema
187
17k
Producing Creativity
orderedlist
PRO
348
41k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Everyday Curiosity
cassininazir
0
400
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Navigating Team Friction
lara
192
16k
Navigating Weather and Climate Data
rabernat
0
590
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
How GitHub (no longer) Works
holman
316
150k