Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Enum Pro

Laravel Enum Pro Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Simplified and enhanced version of php built-in enum.

Frequently asked questions about Laravel Enum Pro
How do I install lazerg/laravel-enum-pro?
Install it with Composer using composer require lazerg/laravel-enum-pro. The package is a single-namespace, Composer-installable convenience layer over PHP 8.1+ backed enums, so integration is usually quick. Check the composer.json constraints first to confirm the Laravel and PHP versions your app uses are allowed.
Which Laravel and PHP versions does Laravel Enum Pro support?
The package targets Laravel applications on PHP 8.1+ and is described as fitting Laravel 9, 10, and 11 codebases that already use native backed enums. Because it is a low-volume package, verify the illuminate/support constraint in composer.json before a framework upgrade. If the constraint lags, you may need to wait, patch, or fork.
Does Laravel Enum Pro replace native PHP enums?
No. Laravel Enum Pro is additive sugar over native PHP backed enums, not a replacement type. It adds helpers such as label(), values(), options(), and toArray() while keeping enums idiomatic for Eloquent casts, validation, form requests, API resources, and factories. The main architectural caution is not letting package-specific helpers leak into domain logic as an uncontrolled contract.
How does Laravel Enum Pro work with Eloquent casts?
Eloquent casting is one of the advertised affordances, and the underlying native backed enum remains compatible with Laravel's enum casting. Use the package helpers for presentation and keep casts and persistence behavior covered by tests. Confirm how values are stored and serialized before relying on them in existing data.
Can I use Laravel Enum Pro for enum validation rules in form requests?
Yes, validation rules are a core feature, alongside Laravel's native Rule::enum support. You can use them in form requests and other validation paths to keep enum inputs consistent. Test the rule behavior with your specific enum cases and any localized labels you expose.
How do labels, descriptions, and localization work in Laravel Enum Pro?
label() and description() provide human-friendly enum output, and the package advertises localization support for display strings. Those derivations become an API contract if you serialize them into JSON or store them in the database. Decide early how labels map from case names and how ordering works, because changing it later can be a data migration.
How can I build select options from a PHP enum in Laravel?
options() and toArray()/values() are intended to build select options and simple payloads from enum cases. That cuts boilerplate in Blade forms, APIs, and Inertia-style payloads. Treat option ordering and label text as public behavior once they reach clients.
Is Laravel Enum Pro maintained and safe for production?
Treat it as a small, single-maintainer dependency: community signals are weak at roughly 43 stars and a 0.375 composite score, which is a legitimate abandonment-risk flag. The code is described as small enough to vendor or fork in an afternoon. Pin the version, check open issues and PRs, verify PHPStan/Psalm baselines and CI coverage, and have an exit plan before org-wide standardization.
What are alternatives to Laravel Enum Pro?
The strongest alternative is native PHP backed enums plus a local trait that provides the toArray(), label(), and options() helpers you actually need. A 30-minute spike comparing the package API with an approximately 80-line trait is the decisive test. For legacy code, myclabs/php-enum exists, but mixing that idiom with native enums without a deliberate migration is worse than choosing one.
Is Laravel Enum Pro framework-agnostic or tied to illuminate/support?
The key dependency question is whether it requires illuminate/support; if it is framework-coupled, using it outside Laravel is limited. It is also a poor fit for codebases still on myclabs/php-enum or class-constant enum patterns unless you deliberately migrate. Check composer.json and run a small compatibility test before adopting it broadly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource