spatie/laravel-model-states
Add robust state behavior to Laravel Eloquent models using the state pattern and state machines. Represent each state as a class, cast states transparently to/from the database, and define clear, safe transitions with configurable state logic.
When a transition is successfully performed, an event will be dispatched called \Spatie\ModelStates\Events\StateChanged. This event hold references to the initial state (initialState), the new state (finalState), the transition class that performed the transition (transition), the model that the transition was performed on (model) and the field name that was transitioned (field).
How can I help you explore Laravel packages today?