lazerg/laravel-enum-pro
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.
Architecture fit
label(), values(), options(), toArray(), and comparable helpers. That means it introduces value objects, not infrastructure — no service provider coupling, no runtime middleware, no database surface. Architectural blast radius is genuinely small.Rule::enum), form requests, API resources, and factories. The package is additive sugar, not a parallel abstraction — this is the right shape for a Laravel codebase and is compatible with DDD-style bounded contexts.label(), description(), values()) inside domain logic, validation rules, and Blade/Inertia payloads. Once that happens, the package is no longer sugar — it is a dependency with a public API you do not control.Integration feasibility
Technical risk
illuminate/support constraints, which blocks framework upgrades until a fork or patch lands.label() derives from case names, how values() orders output) become API contracts if serialized into JSON responses or stored in the database. Changing them later is a data-migration problem, not a refactor.Key questions
illuminate/support (framework-coupled) or is it framework-agnostic? This determines whether it can be used outside Laravel and how tightly it is versioned.Rule::enum, Enum validation rule), Eloquent casting, and API resources out of the box, or is that the caller's responsibility?Stack fit
myclabs/php-enum or class-constant "enum" patterns unless there is a deliberate migration; mixing both idioms in one domain is worse than either alone.toArray()/label() helpers across dozens of enum classes.Migration path
use EnumPro or equivalent) rather than by rewriting existing enums. Existing classes gain helpers without changing their identity or their stored values.value, label, and ordering defined in the enum itself, and treat package methods as presentation helpers. If the package is abandoned, a drop-in replacement trait of comparable size restores behaviour — the migration is a use statement plus a namespace change, not a data migration.Compatibility
composer why-not against the intended Laravel/PHP targets before committing. Pin the package in composer.lock and add it to the upgrade checklist for every framework major.php artisan optimize/config caching and under Octane — negligible risk for a pure helper library, but worth one smoke test if Octane is in use.Sequencing
Maintenance
Support
Scaling
label() semantics, the more expensive any future change becomes. Standardize and freeze the contract early.Failure modes
->value. Mitigation: lint rule or static-analysis check enforcing one pattern.Ramp-up
How can I help you explore Laravel packages today?