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
State Machine

State Machine Laravel Package

hyn/state-machine

A lightweight state machine for Laravel that lets you define states and transitions on Eloquent models, validate and apply transitions cleanly, and keep business logic out of your controllers.

View on GitHub
Deep Wiki
Context7

hyn/state-machine adds finite state machine behavior to Laravel Eloquent models. Define the states an entity may occupy and the transitions allowed between them; the package enforces those rules, rejects invalid transitions, and persists the current state on the model.

  • Declare states and transitions per model
  • Guard callbacks to authorize or veto transitions
  • Laravel events dispatched on state changes
  • Helpers and query scopes for the current state
  • Exceptions on illegal transitions for safer domain logic
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource