somnambulist/attribute-model
A Laravel package for declarative model attributes: define typed, castable fields on Eloquent models using PHP attributes, with generated accessors, mutators, and validation—so you can add structured metadata without extra tables or boilerplate.
read-models, so its real value is as a supporting dependency when the team has already decided to invest in event-sourced or CQRS-style read sides. It informs how we hydrate, not whether we should.Adopt only when most of the following hold:
somnambulist-tech ecosystem (read-models, event-sourcing packages) and this arrives as a natural, compatible dependency.Look elsewhere when:
spatie/laravel-data for DTOs, or Symfony Serializer.For executives: This is a small, MIT-licensed infrastructure component for typed data hydration. It is not a platform bet and carries no direct product risk — but it also has no community adoption, no ecosystem, and a single maintainer. Treat it as a tactical dependency, not a strategic one. Approve it only as part of an existing read-model or event-sourcing effort; otherwise use Laravel-native casting or a mainstream DTO library.
For engineering: It saves boilerplate if you are already in the somnambulist stack — attribute models plus type casting, extracted from read-models. The trade-off is bus-factor risk and self-serve support. Mitigations are straightforward: pin the version, keep the integration behind a thin internal interface, and confirm the MIT license permits forking if upstream goes quiet. If the team is not already using the author's packages, the integration cost is likely higher than writing the casts directly.
How can I help you explore Laravel packages today?