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

Domain Model Laravel Package

complex-heart/domain-model

Domain modeling toolkit for Laravel and PHP applications. Provides reusable base classes and utilities for entities, value objects, aggregates, and domain events, helping you keep business logic expressive, testable, and independent of framework concerns.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for domain primitives. The package supplies ready-made base types for Value Objects, Entities, Aggregates, and Domain Services. That turns "do we hand-roll our DDD scaffolding or adopt a toolset?" into a bounded, reversible decision instead of an open-ended architecture project.
  • Investment in a richer domain layer. If the roadmap includes pricing rules, entitlements, billing, or workflow state that must be correct and auditable, this package is a low-cost way to standardize how those concepts are modeled without committing to a heavier framework.
  • Standardization across squads. A shared vocabulary and base classes make Value Objects (money, IDs, email, date ranges) and aggregate boundaries consistent between teams, which supports code review, onboarding, and cross-team refactoring decisions.
  • Modular monolith / bounded-context direction. Aggregates and Domain Services map cleanly onto module boundaries, so adopting this reinforces a roadmap decision to separate contexts before considering service extraction.
  • Domain events and auditability roadmap. Aggregate-oriented modeling is the natural precursor to domain events, so this is a cheap option on future event-driven or compliance/audit capabilities—without paying for an event-sourcing framework now.
  • Feature delivery sequencing. Because it removes boilerplate around immutability and identity, it shortens the estimate for features that touch core business rules, which informs release planning and staffing.

When to Consider This Package

Consider it when:

  • You are starting a greenfield Laravel/PHP service with genuinely complex business rules—not CRUD—and want DDD building blocks without a full framework.
  • The team already knows DDD concepts and mainly needs consistent, tested base classes rather than education.
  • You value a small, MIT-licensed, framework-agnostic surface that composes with Laravel rather than replacing Eloquent or the container.
  • You are willing to own the code: pin a version, wrap it behind your own namespaces/interfaces, and treat it as vendored infrastructure.
  • The scope is narrow enough that a one- or two-sprint spike can validate it before it spreads.

Look elsewhere when:

  • The product is primarily CRUD or reporting; the abstraction cost will exceed the benefit.
  • You need vendor support, SLAs, or a large hiring pool—3 stars and 0 dependents means no ecosystem validation, no community answers, and no third-party tutorials.
  • You need event sourcing, sagas, or persistence orchestration; evaluate Broadway, EventSauce, or Prooph instead.
  • The team is not DDD-fluent; the package enforces vocabulary it does not teach, and misuse produces leaky aggregates.
  • You require long-term maintenance guarantees. Also verify release provenance—the recorded last release date (2026-08-11) should be confirmed before treating the project as actively maintained.

How to Pitch It (Stakeholders)

For executives: This is a small, free (MIT) library that gives our engineers standard building blocks for modeling core business rules—pricing, entitlements, billing logic—so those rules live in one well-tested place instead of being scattered through controllers and database code. Expected payoff is fewer defects in the logic that directly affects revenue, faster onboarding onto that logic, and a cleaner path if we later need audit trails or event-driven features. The cost is near zero in licensing, but the project has minimal public adoption, so I am recommending a time-boxed evaluation on one bounded module, with the explicit assumption that we own and can fork the code. Decision requested: approve a short spike, not a company-wide standard.

For engineering: Thin, framework-agnostic primitives for Value Objects, Entities, Aggregates, and Domain Services—no lock-in to a persistence layer, composes with Laravel and Eloquent. It removes repetitive immutability and identity code and gives us a shared vocabulary. The trade-off is real: 3 stars, zero dependents, and effectively a single-maintainer risk profile. Mitigation is to pin the version, wrap it behind our own interfaces so it is replaceable, and add our own test coverage around aggregate invariants. Success criteria for the spike: one module modeled end to end, measurable reduction in boilerplate, and no friction with Eloquent or our existing conventions. If the spike fails those criteria, we fall back to hand-rolled base classes at modest extra cost.

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.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment