dasprid/enum
dasprid/enum brings type-safe, object-based enums to PHP. Define a fixed set of values with labels, comparisons, serialization and validation, reducing magic strings/ints and improving readability in domain models and configuration.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| spatie/laravel-enum | 0.86 | 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 | |
| nasyrov/laravel-enums | 0.86 | Laravel Enums adds first-class enumeration support: define typed enum classes, then use them as Eloquent casts, validation rules, and translatable labels. Helpers for values, options, and comparisons make model attributes and form choices safer and more expressive. | 32 | — | 9 | — | 0 | 0.7 | — | MIT | 5 years ago | |
| henzeb/enumhancer | 0.85 | — | 69 | 69 | 8 | 40K | 0 | 13.0 | 39.2 | AGPL-3.0 | 10 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 | — | — | — | |
| onursimsek/laravel-extended | 0.85 | Laravel Extended adds developer-friendly extensions to Laravel, including practical helpers, macros, and model/query conveniences that reduce boilerplate for common tasks. It stays lightweight and framework-native, making it easy to drop into existing apps. | 28 | 28 | 3 | 0 | 0 | 4.3 | — | MIT | 9 months ago | |
| emreyarligan/enum-concern | 0.85 | Adds a lightweight EnumConcern trait for PHP/Laravel enums with helpers for labels, values, options, validation rules, and select arrays, making enums easier to use in forms, APIs, and Blade views. | 212 | 212 | 8 | 3K | 2 | 2.1 | 16.9 | MIT | 1 year ago | |
| elao/enum | 0.85 | Opinionated extensions for PHP 8.1+ native enums with readable labels, flag/bitmask enums, and extra values. Includes integrations for Symfony (Forms, HTTP Kernel arg resolver, Translation, VarDumper), Doctrine ORM/ODM, and Faker. | 327 | 327 | 29 | 46K | 15 | 25.0 | 37.3 | MIT | 6 months ago | |
| bensampo/laravel-enum | 0.85 | 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 | — | |
| laudis/typed-enum | 0.85 | — | 4 | 4 | 0 | 43K | 0 | 0.0 | 54.4 | MIT | — | |
| spatie/enum | 0.85 | Obsolete: PHP 8.1+ has native enums (recommended). Spatie Enum provides strongly typed, object-based enums for older PHP versions, enabling IDE-friendly static analysis and refactoring. Define enums via @method annotations and call StatusEnum::draft(). | 854 | 857 | 67 | 2M | 0 | 15.3 | 46.3 | MIT | 4 years ago | |
| archtechx/enums | 0.84 | 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 | |
| sakanjo/laravel-easy-enum | 0.84 | Simplify PHP enums in Laravel with sakanjo/laravel-easy-enum. This lightweight package provides helpers for labels, values, options, validation rules, and Eloquent/Blade integration, reducing boilerplate and keeping enum-driven code clean and readable. | 10 | — | 0 | — | 0 | 12.4 | — | MIT | 5 months ago | |
| paillechat/php-enum | 0.84 | PHP 7+ enum library: define enums by extending Enum and declaring constants, then instantiate via static named calls (IssueType::ONE()). Instances are strict-equal singletons, work with in_array/type hints, and can convert to/from names. | 16 | 17 | 3 | 847 | 0 | 2.0 | 23.6 | MIT | 8 years ago | |
| datomatic/enum-helper | 0.84 | Laravel helper for PHP enums that adds labels, descriptions, colors, icons, select options, validation rules, and Eloquent casts. Expose enum values and names to build forms, APIs, and admin UIs with less boilerplate. | 59 | 60 | 2 | 19K | 0 | 18.6 | 40.1 | MIT | 1 month ago | |
| mad-web/laravel-enum | 0.84 | A Laravel package that provides a lightweight enum implementation with model attribute casting, validation rules, translations, and helper methods for working with predefined values throughout your application. | 0 | 110 | — | 6 | — | 0.0 | 11.7 | — | — | |
| adrenalinkin/enum-mapper | 0.84 | — | 1 | 1 | 0 | 0 | 0 | 0.0 | — | MIT | — | |
| chadsikorra/php-simple-enum | 0.84 | A lightweight, dependency-free enum implementation for PHP. Define constant sets with helper methods for validation, value lookup, and comparison, useful where native enums aren't available. Simple API that's easy to drop into existing projects. | 11 | — | 0 | — | 0 | 0.1 | — | MIT | — |
|
| myclabs/php-enum | 0.84 | myclabs/php-enum brings SplEnum-style enums to PHP. Define enum classes, get autogenerated static constructors, validate values, compare instances, list possible values, and use enums as parameter/return types with extra methods—without a PHP extension. | 2,718 | 2,754 | 125 | 4M | 12 | 30.1 | 47.7 | MIT | 1 year ago | |
| eloquent/enumeration | 0.84 | Eloquent Enumeration brings typed enum support to Laravel’s Eloquent models. Define reusable enums, cast attributes to enum instances, and keep status or type fields type-safe and expressive without leaving familiar Eloquent conventions. | 146 | — | 12 | — | 3 | 0.9 | 0.5 | MIT | 7 years ago |
|
| datomatic/laravel-enum-helper | 0.84 | Laravel Enum Helper adds handy methods to PHP enums: flag support, attribute casting, validation rules, labels, translations, select arrays, and comparison helpers, making it easy to use backed enums cleanly across your Laravel models, forms, and requests. | 35 | — | 4 | — | 0 | 7.9 | — | MIT | 7 months ago |
|
How can I help you explore Laravel packages today?