DDD Value Objects &amp; DTOs in Laravel Without Bloat | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. DDD Value Objects and DTOs in Laravel Without the Bloat

 DDD Value Objects and DTOs in Laravel Without the Bloat
========================================================

 Learn how to implement domain-driven value objects and data transfer objects in Laravel using PHP 8.3 readonly classes, keeping your domain layer clean without heavyweight DDD frameworks.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 21 Jul 2026 · Updated 21 Jul 2026 · 1 min read

ShareCopy linkCopied

 ![DDD Value Objects and DTOs in Laravel Without the Bloat](https://cdn.msaied.com/450/41688537085b86f102fd8c219a35319f.png) 

  On this page +1. [The Problem With Anemic Domain Models](#the-problem-with-anemic-domain-models)
2. [Value Objects: Identity Through Value](#value-objects-identity-through-value)
3. [Casting Value Objects in Eloquent](#casting-value-objects-in-eloquent)
4. [DTOs: Typed Input Boundaries](#dtos-typed-input-boundaries)
5. [Why Not Spatie Data?](#why-not-spatie-data)
6. [Takeaways](#takeaways)

 The Problem With Anemic Domain Models
-------------------------------------

Most Laravel codebases pass raw arrays or plain Eloquent models between layers. This works until it doesn't: you find yourself writing `$data['email']` in five controllers, validating the same format in three places, and debugging a `null` that should never have been allowed in.

Domain-driven design offers two lightweight tools that fix this without requiring a framework: **value objects** and **DTOs**. PHP 8.3 readonly classes make both feel native.

Value Objects: Identity Through Value
-------------------------------------

A value object has no identity beyond its data. Two `Money` instances with the same amount and currency are equal. They are immutable by definition.

```php
