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
840
A practical look at multitenancy in Laravel
freekmurze
1
340
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
720
Highlights Flare codebase (Laracon online)
freekmurze
0
490
Introducing Mailcoach
freekmurze
1
610
Other Decks in Programming
See All in Programming
Beyond_the_Prompt__Evaluating__Testing__and_Securing_LLM_Applications.pdf
meteatamel
0
120
オープンソースコントリビュート入門
_katsuma
0
150
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
430
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.7k
Flutterでllama.cppをつかってローカルLLMを試してみた
sakuraidayo
0
160
AI時代のリアーキテクチャ戦略 / Re-architecture Strategy in the AI Era
dachi023
0
150
AIコーディングエージェントを 「使いこなす」ための実践知と現在地 in ログラス / How to Use AI Coding Agent in Loglass
rkaga
4
1.5k
Rubyの!メソッドをちゃんと理解する
alstrocrack
2
380
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
Cloudflare Workersで進めるリモートMCP活用
syumai
12
1.7k
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
0
120
Boast Code Party / RubyKaigi 2025 After Event
lemonade_37
0
120
Featured
See All Featured
Balancing Empowerment & Direction
lara
0
49
Documentation Writing (for coders)
carmenintech
71
4.8k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
180
53k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
33k
Producing Creativity
orderedlist
PRO
344
40k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.5k
Writing Fast Ruby
sferik
628
61k
Designing for humans not robots
tammielis
253
25k
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