Laravel DTO (without duplication of code) 🤩

Laravel DTO (without duplication of code) 🤩

3 Lượt nghe
Laravel DTO (without duplication of code) 🤩
❌̶ ̶N̶o̶ ̶M̶a̶n̶u̶a̶l̶D̶T̶O̶C̶l̶a̶s̶s̶,̶ ̶V̶a̶l̶u̶e̶O̶b̶j̶e̶c̶t̶,̶ ̶F̶o̶r̶m̶R̶e̶q̶u̶e̶s̶t̶,̶ ̶V̶a̶l̶i̶d̶a̶t̶o̶r̶ ̶R̶e̶s̶o̶u̶r̶c̶e̶s̶ ̶a̶n̶y̶ ̶m̶o̶r̶e̶ Links ----------- Laravel Data: https://spatie.be/docs/laravel-data/v4 Laravel Validator: https://github.com/andersao/laravel-validator PHP SPL Library: https://www.php.net/manual/en/spl.datastructures.php Chapters -------------------- 0:00 - Intro 0:15 - Why you need DTO (Data Transfer Object) ? 01:25 - PHP dynamic arrays (maps) DTO Problem 01:55 - Real Array & PHP SPL::fixedArrays 02:24 - Failed Laravel Developer Tries to create all-in-one DTO 02:33 - Validation Based DTO problems (FormRequest , Validator) 04:15 - Transform Based DTO problems (Presenter, Transformer, Resource) 04:59 - Manual Class Based DTO problems (ClassDTO, ObjectValue) 05:37 - Successfull Laravel Data All-in-one DTO Example 09:45 - Outro