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

Enumhancer Laravel Package

henzeb/enumhancer

View on GitHub
Deep Wiki
Context7

Constructor

For people coming from Spatie's PHP Enum, this one will allow you to easily migrate away to actual enums.

Usage

Add the Constructor trait and add the docblock just like you would with Spatie's package.

use Henzeb\Enumhancer\Concerns\Constructor;

/**
 * [@method](https://github.com/method) static self CALLABLE()
 */
enum yourEnum {
    use Constructor;

    case CALLABLE;
}

Examples

YourEnum::CALLABLE(); // will return YourEnum::CALLABLE;

Note: This trait is not enabled by default when using the Enhancers trait.

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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator