Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Attribute Model Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on the hydration layer. This package answers a narrow question: do we hand-roll typed attribute hydration/casting for read models and DTOs, or adopt a small pre-built base class? It is a building block, not a product capability — it should only surface in roadmap discussions as an implementation cost line inside a larger CQRS/read-model initiative.
  • Read-model / CQRS architecture bets. The package is extracted from 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.
  • API and data-shaping consistency. If multiple services need attribute-based objects with type casting (immutable value objects, typed DTOs from DB rows or arrays) without pulling in Eloquent, this is a candidate for standardizing that pattern.
  • Dependency footprint decisions. With 0 stars and 0 dependents, it provides essentially no market signal. It should not be used to justify a roadmap direction; it can only reduce effort after a direction is chosen.

When to Consider This Package

Adopt only when most of the following hold:

  • The team is already inside the somnambulist-tech ecosystem (read-models, event-sourcing packages) and this arrives as a natural, compatible dependency.
  • You need attribute-based models with type casting that are deliberately decoupled from Eloquent and its lifecycle.
  • The maintainer's conventions are acceptable to the team, and you are comfortable reading the source as the primary documentation.
  • You can pin the version, MIT licensing lets you fork or vendor it, and you have an exit path if maintenance stops.
  • PHP version and framework constraints of your project match the package's supported range.

Look elsewhere when:

  • You need community validation, an active issue tracker, or vendor-backed support — this package has none of those signals.
  • The problem is already solved by mainstream options: Eloquent casts and custom cast classes, spatie/laravel-data for DTOs, or Symfony Serializer.
  • The team is not already invested in the author's stack; introducing a single-maintainer, zero-adoption dependency as a foundational layer is disproportionate risk.
  • The requirement is really "typed objects in Laravel," in which case the build-vs-buy math favors native casts or a widely adopted DTO package.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk