PHPackages                             azimkordpour/power-enum - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. azimkordpour/power-enum

ActiveLibrary

azimkordpour/power-enum
=======================

This light package provides some methods to your Enum classes to make the most of them.

v1.2(1y ago)4115.6k↑22.2%1MITPHPPHP ^8.1CI passing

Since Jul 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/azim-kordpour/power-enum)[ Packagist](https://packagist.org/packages/azimkordpour/power-enum)[ RSS](/packages/azimkordpour-power-enum/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (1)

Power Enum Classes in PHP
=========================

[](#power-enum-classes-in-php)

This lightweight package provides a `Trait` that allows you to fully utilize Enum classes in your PHP projects, particularly in modern PHP frameworks like `Laravel`.

Installation
------------

[](#installation)

> **NOTE:** As Enum was introduced in PHP 8.1, this package requires a minimum PHP version of 8.1.

You can install the package via composer:

```
composer require azimkordpour/power-enum
```

Usage Instructions
------------------

[](#usage-instructions)

To use the `PowerEnum` trait in your Enum class, simply import it like this:

```
