konekt/enum
Lightweight PHP enum base class (pre-PHP 8.1) for defining value-safe constants via abstract Enum subclasses. Simple instantiation, validation and utilities, with docs and optional Laravel Eloquent integration via konekt/enum-eloquent.
As of Enum v4.1 the EnumInterface has been added.
The base enum class implements it in a backwards-compatible manner.
The usage of the interface is fully optional, it's aim is to support scenarios where specific enums are hinted with interfaces, and it serves as a common root interface.
Next: Methods »
How can I help you explore Laravel packages today?