apie/type-converter
Apie Type Converter converts values and objects to other types, ideal for mapping between DTOs and domain objects. Includes a default converter factory and lets you register custom converters to handle your own conversion rules.
User domain objects to UserDTO for an auth service).toArray()).Adopt if:
ArrayHelper, custom mappers) is fragile or duplicated.Look elsewhere if:
toArray() conversions (use Eloquent’s built-in features).*"This package lets us decouple our domain logic from persistence/API layers, reducing technical debt and making our system more adaptable. For example:
*"Problem: Our current type conversion is either:
Solution: This package provides a composable, framework-agnostic way to convert objects with:
User → UserDTO for API, CLI, and tests).Migration Path:
return $user->toArray() with $converter->convert($user, UserDTO::class)).Risk: Low—MIT license, active (though small) community, and Laravel-compatible."*
How can I help you explore Laravel packages today?