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
180
An Introduction to Snapshot testing
freekmurze
0
460
Event Sourcing In Laravel
freekmurze
0
230
Building a realtime dashboard with Laravel Livewire (PHPKonf)
freekmurze
0
760
A tour behind the scenes of Oh Dear (PHP Benelux)
freekmurze
2
820
A practical look at multitenancy in Laravel
freekmurze
1
330
A practical look at multitenancy in Laravel (Laracon US)
freekmurze
0
700
Highlights Flare codebase (Laracon online)
freekmurze
0
460
Introducing Mailcoach
freekmurze
1
600
Other Decks in Programming
See All in Programming
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
color-scheme: light dark; を完全に理解する
uhyo
5
390
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
390
Honoとフロントエンドの 型安全性について
yodaka
7
1.3k
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
時計仕掛けのCompose
mkeeda
1
300
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
730
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
170
Amazon Bedrock Multi Agentsを試してきた
tm2
1
290
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
11
4k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Into the Great Unknown - MozCon
thekraken
35
1.6k
The Cult of Friendly URLs
andyhume
78
6.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Producing Creativity
orderedlist
PRO
344
39k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
450
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
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