markbaker/enumhelper
A lightweight PHP helper for native enums, offering convenient methods for listing cases, names and values and converting enums into arrays or options for forms, validation and select inputs.
Rule::enum), route binding, and serialization. markbaker/enumhelper is a thin trait library that sits alongside—not inside—that stack. It fits best where the application has many enums and repeated boilerplate for case lists, value/name arrays, validation, or option maps. It is a poor fit as a core domain dependency because presentation concerns such as labels can leak into domain enums.composer require plus adding traits to selected enums. The real feasibility question is not “can we integrate?” but “is the utility worth the lifecycle risk?”cases() plus a small internal trait. If adopted, wrap usage behind an internal trait or adapter (for example, an App\Support\Enum\HasOptions contract) to limit vendor lock-in and make replacement cheap. Migrate enums opportunistically rather than retrofitting the entire codebase.composer.json PHP constraint against the current runtime, run composer why-not for PHP/Laravel versions, and check trait method names against existing enum methods. Add PHPStan/Psalm coverage and confirm behavior under strict_types. Validate pure versus backed enum behavior explicitly.cases() and Laravel’s Rule::enum.How can I help you explore Laravel packages today?