Using it we can create better and more cohesive Domain Model.

Embeddable let’s you aggregate some properties, that are linked together in some way, into one cohesive class. You may say — well, I can create another entity and create a relation, what is the difference?

Only the properties that had to be mutated in some way will point to another object somewhere else in memory.

If you will need to implement identity in some class in other way, you will just not extend this one.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners