dragon-code/simple-data-transfer-object
dragon-code/simple-data-transfer-object offers a lightweight way to define typed data transfer objects in Laravel and PHP applications, helping you move structured data between layers with less boilerplate and clearer, more predictable code. Ideal for request payloads, API responses, and service bou...
spatie/laravel-data or native PHP 8 readonly classes later, because the surface area is small.spatie/laravel-data (validation + nested DTOs + Laravel integration), spatie/data-transfer-object (simpler, but also in maintenance mode), WendellAdriel/validated-dto, or plain PHP 8 readonly classes with constructor property promotion — which for a "simple" DTO is often the whole feature set anyway.To executives: A small, MIT-licensed helper for structuring data moving through a Laravel app — the kind of utility that reduces "array soup" bugs at low cost and zero vendor spend. It is not a strategic dependency: the project is archived and has essentially no adoption, so we'd treat it as internal code we own rather than a supported library. Recommendation: fine as a low-risk internal convenience, not appropriate for anything customer-facing or security-sensitive.
To engineering: A thin DTO base — typed properties, hydration from arrays, serialization back out — without the weight of a full data-mapping framework. Small surface area, easy to fork and pin, easy to replace with native PHP 8 readonly classes or spatie/laravel-data if requirements grow. Caveat: unmaintained and archived, so we take on patch duty; adopt deliberately, keep it off critical paths, and don't build deep abstractions on top of it.
How can I help you explore Laravel packages today?