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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
81
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
950
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
Performance Optimization With LLMs
xleitix
0
250
Seven New Principles of Software Engineering
yegor256
0
480
Railsバージョンを4倍にした話
optim
0
1k
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
320
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
250
Spec-driven Development with AI
simas
PRO
0
2.3k
ActionController meets Protocol Buffers
sorah
1
800
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
310
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
240
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Evolving SEO for Evolving Search Engines
ryanjones
0
360
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
520
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
670
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330
The untapped power of vector embeddings
frankvandijk
2
2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Rails Girls Zürich Keynote
gr2m
96
14k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Paper Plane (Part 1)
katiecoart
PRO
3
12k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k