Slide 1

Slide 1 text

I shall say define this only once

Slide 2

Slide 2 text

About me Freek Van der Herten Developer at SPATIE @freekmurze freek.dev mailcoach.app ohdear.app fl areapp.io

Slide 3

Slide 3 text

Open source ± 300 packages on Packagist ± 360 000 000 downloads total ± 20 000 000 downloads a month

Slide 4

Slide 4 text

spatie.be/open-source

Slide 5

Slide 5 text

spatie.be/open-source/postcards

Slide 6

Slide 6 text

Let’s talk about Laravel Data

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

This talk A simple example Real world usage in Flare

Slide 10

Slide 10 text

Let’s code

Slide 11

Slide 11 text

In closing

Slide 12

Slide 12 text

Laravel Data Rich data objects De fi ne a data structure only once Can replace API resources, Form Requests, … Generating TypeScript de fi nitions

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

spatie.be/docs/laravel-data

Slide 15

Slide 15 text

Laravel Data For everything For only small parts Don’t just discard the Laravel defaults Do what is best for your team and project

Slide 16

Slide 16 text

One more thing

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

Thank you! freek.dev mailcoach.app spatie.be ohdear.app fl areapp.io