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

Laravel States Laravel Package

aw-studio/laravel-states

Laravel States adds state machine support to Eloquent models, letting you define states, transitions, and guards cleanly. Track model status, control allowed changes, and keep your workflows predictable without extra boilerplate.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Adopt for modeling state machines on Eloquent models (e.g., order status, user lifecycle) to centralize transition logic and reduce scattered status checks.
  • Roadmap: use for new features requiring workflows; avoid for simple boolean flags or one-off status columns.
  • Build vs buy: buy (use package) when you need standard state machine patterns (valid transitions, guards, history); build custom only for highly specialized or performance-critical needs.
  • Use cases: order fulfillment, subscription billing, content moderation, multi-step approval processes.

When to Consider This Package

  • Consider when you have Eloquent models with well-defined states and transitions, and want enforcement of valid transitions, logging, and querying by state.
  • Look elsewhere if you need complex workflow engines (e.g., BPMN), distributed sagas, or if your team prefers explicit custom logic without a package dependency.
  • Evaluate v2.0.1: the removal of a broken, always-erroring method ($model->states()->transition()) signals active maintenance and API cleanup. Ensure your code uses the correct API $model->{type}->transition() before upgrading; no working code is affected.

How to Pitch It (Stakeholders)

  • Executives: reduces bugs and inconsistencies in status-driven features; low-risk dependency with active maintenance (v2.0.1 fixes a non-functional API).
  • Engineering: standardizes state transitions, provides a clean API ($model->{type}->transition()), and avoids reinventing state machine logic. The patch release removes a confusing broken method, so upgrading is safe and improves clarity. No breaking changes for working code.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package