brokeyourbike/enum-casts-laravel
A Laravel package that adds convenient Eloquent enum casts, letting you store and retrieve PHP enum values on model attributes with minimal boilerplate. Simplifies working with backed enums in database columns and keeps model code clean.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| nasyrov/laravel-enums | 0.88 | 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 | |
| roundly-consulting/enums-for-laravel | 0.88 | Enums for Laravel brings first-class PHP enum support to Laravel applications. Cast enum attributes in Eloquent models, validate enum input, and work with backed values across requests and APIs. It keeps code type-safe, readable, and easy to integrate without extra boilerplate. | 5 | 0 | 0 | 3K | 0 | 18.9 | 43.7 | MIT | 3 weeks ago | |
| lazerg/laravel-enum-pro | 0.87 | 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 | — | — | — | |
| brokeyourbike/country-casts-laravel | 0.87 | Laravel Eloquent casts for country codes, converting attributes to and from country value objects or enums automatically. Keep ISO country data typed and validated in your models with minimal boilerplate. | 0 | 0 | 0 | 15 | 0 | 0.1 | 16.6 | MPL-2.0 | 3 years ago | |
| cerbero/laravel-enum | 0.86 | Cerbero Laravel Enum adds type-safe enum classes to Laravel, with validation rules, model casting, and helper methods for labels and values. A clean way to replace scattered constants with organized, reusable enum objects. | 189 | 190 | 19 | 3K | 0 | 1.5 | 16.2 | MIT | — | |
| synergitech/laravel-magic-enums | 0.85 | Laravel Magic Enums adds powerful helpers to PHP enums: labels, descriptions, validation rules, model casts, select options, and fluent methods, making enums more expressive and convenient throughout Laravel applications. | 9 | — | 0 | — | 0 | 9.4 | — | MIT | 6 months ago | |
| brokeyourbike/money-casts-laravel | 0.85 | Laravel Eloquent casts for monetary values that convert database amounts into Money objects and back, keeping currency handling clean and consistent across your models. | 1 | — | 1 | — | 0 | 0.1 | — | MPL-2.0 | 3 years ago | |
| datomatic/laravel-enum-helper | 0.85 | 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 |
|
| isap-ou/laravel-enum-helpers | 0.84 | Laravel Enum Helpers provides convenient utilities for working with PHP enums in Laravel applications, including human-readable labels, option arrays for forms, validation support, and conversion helpers that keep enum-backed APIs and Blade views consistent. Reduce repetitive enum logic and simplify... | 6 | — | 2 | — | 0 | 20.2 | — | — | 1 week ago | |
| datomatic/laravel-enum-collections | 0.84 | Laravel Enum Collections extends Laravel’s Collection API to PHP enums, letting you wrap enum cases and use familiar filter, map, sort, group, pluck, and transform methods. It keeps enum-heavy Laravel code cleaner, more expressive, and easier to chain without extra boilerplate. | 8 | 9 | 1 | 365 | 0 | 9.2 | 24.1 | MIT | 6 months ago | |
| marc-mabe/php-enum | 0.84 | Native PHP enum implementation via an abstract base class. Extend it to define enumerations from public constants (supports scalars, null, and arrays), create and compare enum instances, and keep a strict set of named values for safer domain modeling. | 498 | 506 | 35 | 8M | 2 | 12.9 | 55.1 | BSD-3-Clause | 1 year 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 | — | — | |
| innoge/laravel-enum-states | 0.84 | 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. | 5 | 5 | 1 | 3K | 0 | 20.1 | 44.0 | MIT | 5 days ago | |
| bensampo/laravel-enum | 0.83 | 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 | 505K | 1 | 15.0 | 33.1 | MIT | — | |
| spatie/laravel-enum | 0.83 | 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 | |
| sakanjo/laravel-easy-enum | 0.83 | 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 | |
| foxbytehq/laravel-backed-enums | 0.83 | A Laravel package that adds handy helpers to PHP backed enums, including human-readable labels, validation rules, select options, comparisons, and Eloquent-friendly utilities so you can use enums confidently across forms, requests, and models. | 44 | 45 | 4 | 348 | 1 | 9.3 | 14.4 | MIT | 7 months ago | |
| gearbox-solutions/enum-converter-laravel | 0.83 | Laravel package for converting PHP enums to and from database and JSON values. Provides convenient helpers and casts so enum-backed Eloquent attributes stay consistent across models, queries, and API responses. | 0 | — | 1 | — | 0 | 0.3 | 0.4 | MIT | 1 year ago | |
| henzeb/enumhancer-ide-helper | 0.83 | Laravel IDE helper for enhanced PHP enums. Improves autocompletion and type hints for Enumhancer features in PhpStorm and similar IDEs, generating stubs/metadata so enum methods, cases, and helpers are easier to discover and use. | 0 | 0 | 0 | 827 | 0 | 0.3 | 40.3 | AGPL-3.0 | 3 years ago | |
| henzeb/enumhancer | 0.82 | — | 69 | 69 | 8 | 40K | 0 | 13.0 | 39.2 | AGPL-3.0 | 10 months ago |
How can I help you explore Laravel packages today?