Ross ROSS = Recommend OSS · open-source software intelligence for agents

spatie/laravel-model-states

State support for models observed · 2026-08-28

github.com/spatie/laravel-model-states · homepage · PHP · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

91/100

  • Activity 93
  • Release rhythm 82
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.

  • gap_med: 33.0
  • age_days: 2556
  • days_rel: 42
  • days_push: 42
  • n_releases_24m: 17

Full methodology

Adoption not part of the score

1302 stars · 105 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A Laravel package that adds state machine support to Eloquent models, letting each state be a separate class with defined transitions. It handles state serialization to the database and provides controlled state transition logic.

Use cases

  • implement a state machine for laravel eloquent models
  • model order or payment statuses in laravel
  • manage allowed state transitions on database records
  • replace status string columns with typed state classes
  • add state pattern behaviour to php models

When to choose

  • you use Laravel/Eloquent and need typed, class-based model states
  • you want enforced, validated transitions between states
  • you need per-state behaviour and serialization handled automatically

When to avoid

  • you're not using Laravel or Eloquent
  • a simple enum or string status column is sufficient
  • you need a full standalone workflow engine rather than model states

Facets

library · maturity stable

state-management orm serialization web-development backend developer-tools php laravel eloquent state-machine state-pattern spatie

10 sources

Member repositories

RepositoryRoleHealth v2
spatie/laravel-model-statesmain91

For agents

markdown · JSON · MCP: product_card(name="spatie/laravel-model-states")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem