Morning gals and guys. In today's episode we'll talk about value objects and how they can be used. Twitter: / przylucki_p More me: saaslaravel.com Website: przemyslawprzy...
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
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
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"