innoge/laravel-enum-states
A state machine for Eloquent built on native PHP enums. Define transitions, defaults, and lifecycle actions on the enum itself, register fields with a single attribute, and keep your normal model casts. Invalid transitions throw; defaults apply automatically.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| peltonsolutions/laravel-enums | 0.90 | A Laravel package for working with PHP enums, offering convenient helpers and framework integration for defining, validating, casting, and using enum values across models, requests, and application code. | 1 | 2 | 0 | 0 | 0 | 0.4 | 0.5 | MIT | 2 years ago | |
| spatie/laravel-model-states | 0.89 | Add state behaviour to Eloquent models by combining the state pattern and state machines. Define each state as a class, cast it on your model, handle database serialization automatically, and transition between states easily. | 1,307 | 1,309 | 107 | 666K | 0 | 40.1 | 44.0 | MIT | 3 days ago | |
| webfox/laravel-backed-enums | 0.88 | Adds Laravel-friendly helpers to PHP backed enums: generate labels and option lists, validate enum values, and use them cleanly in forms, APIs, and application logic. A lightweight way to make backed enums more practical in Laravel. | 44 | 45 | 4 | 404 | 1 | 9.2 | 15.2 | MIT | 7 months ago | |
| spatie/laravel-enum | 0.88 | Laravel integration for spatie/enum: use Enum base class in Laravel, cast model attributes to enums (including nullable and arrays), and get Laravel-friendly behavior via custom casts and Castable support for Eloquent. | 364 | 367 | 37 | 215K | 0 | 11.3 | 38.3 | MIT | 1 year ago | |
| bensampo/laravel-enum | 0.87 | Laravel Enum provides a powerful enum implementation for Laravel with class-constant definitions, instantiation, casting, validation, localization, bitwise/flag enums, and an artisan generator. Not recommended for new projects—use native PHP 8.1 enums. | 2,028 | 2,042 | 157 | 502K | 1 | 15.0 | 33.1 | MIT | — | |
| spatie/laravel-validation-rules | 0.87 | Handy Laravel validation rules by Spatie: Authorized (policy checks), CountryCode, Currency, Enum, ModelsExist, and Delimited. Installs via Composer, auto-registers, and supports publishing translations for customization. | 828 | 836 | 43 | 211K | 0 | 20.6 | 35.0 | MIT | 8 months ago | |
| ringierimu/state-workflow | 0.87 | State workflow for Laravel Eloquent models: define states and allowed transitions, guard changes with custom rules, and react to transitions via events. Centralizes business status logic so it stays clean, testable, and consistent across your app instead of scattered controllers. | 31 | 34 | 12 | 826 | 0 | 7.4 | 20.9 | MIT | 8 months ago | |
| christhompsontldr/laravel-fsm | 0.87 | A plug-and-play finite state machine for Laravel with guards, actions, callbacks, events, and transition logging. Define states and transitions per model column to power order workflows, verification flows, and more. | 8 | 7 | 0 | 5 | 0 | 12.0 | 2.9 | MIT | 5 months ago | |
| open-southeners/laravel-model-status | 0.86 | Lightweight Laravel model status handling using native PHP enums—no extra tables needed. Define a status enum, attach it via a PHP attribute, and use a trait for helpers like setStatus, setStatusWhen, hasStatus, and optional status events. | 0 | 0 | 0 | 248 | 0 | 12.6 | 35.6 | MIT | 6 months ago | |
| juststeveking/state-machine | 0.86 | A lightweight state machine for Laravel and PHP applications. Define states and allowed transitions, then move models or objects through workflows with clear, testable rules and guard conditions. | 2 | 2 | 0 | 316 | 0 | 10.7 | 30.6 | MIT | 5 months ago | |
| sourceboat/laravel-enumeration | 0.86 | A Laravel package for defining and using enumerations in PHP, with support for validation rules, model casting, and comparing enum values in a clean, type-safe way across your application. | 0 | 9 | — | 0 | — | 0.0 | — | — | — | |
| robertboes/laravel-interlock | 0.85 | Laravel Interlock is a lightweight package for preventing concurrent execution of critical code in Laravel apps. It helps avoid race conditions, duplicate jobs, and overlapping tasks with simple, configurable locks and a clean framework-friendly API. | 0 | — | 0 | — | 0 | 19.6 | — | MIT | 2 weeks ago | |
| bensondevs/supercharged-enums | 0.85 | Supercharged Enums adds helpful, expressive methods to PHP 8.1+ enums so you can do more with less code in your Laravel apps. It keeps enum logic clean and readable, with a simple API for common tasks like labels, comparisons, and validation. | 5 | 5 | 0 | 832 | 0 | 13.0 | 33.0 | — | 4 months ago | |
| adrenalinkin/enum-mapper | 0.85 | — | 1 | 1 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| sebdesign/laravel-state-machine | 0.85 | A lightweight Laravel package for adding state machines to Eloquent models. Define states, transitions, and guards, then move records safely between states with validation, events, and clear exceptions. Integrates cleanly with Laravel and supports custom classes. | 341 | — | 59 | — | 2 | 12.1 | 0.4 | MIT | 7 months ago | |
| lazerg/laravel-enum-pro | 0.85 | Laravel Enum Pro enhances PHP enums for Laravel with validation rules, Eloquent casts, labels, descriptions, and localization. Build select options and display human-friendly enum values in forms, APIs, and Blade views with less boilerplate. | 43 | — | 2 | — | 1 | 0.4 | — | — | — | |
| archtechx/enums | 0.85 | Modern PHP enum helpers: casting, validation, labels, and convenience methods for native enums. Add common patterns like options arrays, random values, and comparisons to make enums easier to use across Laravel apps and APIs. | 567 | 568 | 23 | 597K | 2 | 6.9 | 41.6 | MIT | 1 year ago | |
| samuel4x4/state-machine-bundle | 0.85 | samuel4x4/state-machine-bundle provides a simple state machine for PHP/Laravel apps: define states and transitions, guard changes, and hook actions into workflow updates. Keep status logic centralized, explicit, and testable instead of scattering conditionals across models. | 0 | 0 | 0 | 0 | 0 | 5.8 | — | MIT | 8 months ago | |
| cerbero/enum | 0.85 | A powerful enum implementation for Laravel that turns class constants into rich, type-safe enum objects. It adds validation rules, localization, Eloquent casting, comparisons, and Blade helpers while keeping enums simple and extensible. | 362 | 360 | 3 | 8K | 0 | 1.9 | 19.2 | MIT | — | |
| hyn/state-machine | 0.85 | 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. | 16 | 16 | 1 | 3 | 0 | 0.1 | 1.0 | — | — |
How can I help you explore Laravel packages today?