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
340
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
140
An Introduction to Snapshot testing
freekmurze
0
410
Event Sourcing In Laravel
freekmurze
0
210
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
710
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
750
A practical look at multitenancy in Laravel
freekmurze
1
300
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
660
Highlights Flare codebase (Laracon online)
freekmurze
0
400
Introducing Mailcoach
freekmurze
1
570
Other Decks in Programming
See All in Programming
AndroidアプリのUIバリエーションをあの手この手で確認する / Check UI variations of Android apps by various means
tkmnzm
1
130
Amazon BedrockでサーバレスなAIお料理ボットを作成する!!
tosuri13
0
220
Debugging: All you need to know (for simultaneous interpreting)
jmatsu
2
680
Kotlin 2.0 and Beyond
antonarhipov
2
150
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
140
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
460
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
250
null or undefined
susisu
24
6.2k
事業フェーズの変化に対応する 開発生産性向上のゼロイチ
masaygggg
0
190
令和トラベルにおけるLLM活用事例:社内ツール開発から得た学びと実践
ippo012
0
130
Amazon Neptuneで始める初めてのグラフDB ー グラフDBを使う意味を考える ー
satoshi256kbyte
2
260
Android開発以外のAndroid開発経験の活かしどころ
konifar
2
800
Featured
See All Featured
Design by the Numbers
sachag
277
19k
Thoughts on Productivity
jonyablonski
66
4.2k
How GitHub Uses GitHub to Build GitHub
holman
472
290k
In The Pink: A Labor of Love
frogandcode
139
22k
Side Projects
sachag
451
42k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
Designing the Hi-DPI Web
ddemaree
278
34k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
BBQ
matthewcrist
83
9.1k
A Modern Web Designer's Workflow
chriscoyier
691
190k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
227
52k
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