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
370
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
170
An Introduction to Snapshot testing
freekmurze
0
450
Event Sourcing In Laravel
freekmurze
0
220
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
750
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
810
A practical look at multitenancy in Laravel
freekmurze
1
320
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
690
Highlights Flare codebase (Laracon online)
freekmurze
0
450
Introducing Mailcoach
freekmurze
1
590
Other Decks in Programming
See All in Programming
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
290
HTML/CSS超絶浅い説明
yuki0329
0
180
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
26
3.3k
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
480
Go の GC の不得意な部分を克服したい
taiyow
3
1k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
190
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
920
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
140
快速入門可觀測性
blueswen
0
490
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
3
220
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
750
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The World Runs on Bad Software
bkeepers
PRO
66
11k
How to Ace a Technical Interview
jacobian
276
23k
Unsuck your backbone
ammeep
669
57k
A designer walks into a library…
pauljervisheath
205
24k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Bash Introduction
62gerente
610
210k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Code Reviewing Like a Champion
maltzj
521
39k
4 Signs Your Business is Dying
shpigford
182
22k
Optimizing for Happiness
mojombo
376
70k
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