Thank you! In simple terms: Value object is a wrapper on a primitive inside of your system - phone, email, point, coupon etc, whereas DTO is an object with all of the data required for execution of a certain logic. DTOs often times include VO
Awesome! I have used VO for a while but you've made it to the next level... I hope you can release a tutorial of making mini app using DDD architecture.
It would be great to have generics in PHP so you could just pass a to your interface and use the Phone instead of a generic ValueObjectInterface for your isEqual definition
Hey! If you mean replacing characters like "ó" into "o" I think Str::slug handles that out of the box. If you mean localization - you could generate a slug that has a numeric ID and localized slug that's not taken into consideration in route binding i.e. "/blog/1-article"
This is currently my daily favorite channel 🍀 Sooo much indepth about those stuffs
Glad you enjoy it!
Me to 🎉
Great videos. Can you explain the difference between DTO & Value Object? Always confuse with this two terms.
Thank you! In simple terms: Value object is a wrapper on a primitive inside of your system - phone, email, point, coupon etc, whereas DTO is an object with all of the data required for execution of a certain logic. DTOs often times include VO
@@saaslaravel Thanks for the clarification! I probably already use DTO without knowing 😖
I have learned so much from your videos, thank you! This type of videos are just awesome!
Thank you ❤️
Awesome! I have used VO for a while but you've made it to the next level...
I hope you can release a tutorial of making mini app using DDD architecture.
Thanks so much! Tutorial on my version DDD is on the immediate roadmap (and a secret project connected to it 😊)
Yep! we need it!
I was puzzled by the interface. I thought you were going to extend a base value object class and put these common methods there?
It would be great to have generics in PHP so you could just pass a to your interface and use the Phone instead of a generic ValueObjectInterface for your isEqual definition
That's what I tried to do with phpdoc off camera but couldn't get it to work unfortunately :c
@@saaslaravel So sad... Hopefully, PHP will get native generics one day :D
@@igorleal1798 there is a video by Brent where he explains why PHP can't have generics
@@mediliesActually we can have generics in PHP, just like Python does (comments)
@@TheGajos php annotations have no effect on runtime. they only improve IDE experience and work with static analyzers
Great explanation!
Hey mate! One question if I may, how would you handle transliteration when it comes to slugs in Laravel?
Hey! If you mean replacing characters like "ó" into "o" I think Str::slug handles that out of the box. If you mean localization - you could generate a slug that has a numeric ID and localized slug that's not taken into consideration in route binding i.e. "/blog/1-article"
@@saaslaravel Yes, the first option, thank you very much! :D
Awesome 👌 can i have please the name of theme and the font😅 im addicted!
Thanks! It's called Fira Code
@@saaslaravel 🥳 thanks and theme?
I think spatie laravel data package is better for this type of data transformation
It may be, but it's important to be able to understand what's happening under the hood or just being able to implement it from scratch! 😁
@@saaslaravel I agree on this
We miss you
I may or may not be getting back soon 👀
@@saaslaravel all your your videos are inspiring! Just buil some CRM example with DB structure and it will be the,🚀