PHPackages                             theranken/ectype - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. theranken/ectype

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

theranken/ectype
================

A package to supercharge your enums with labels, collections, and Laravel translation support

1.0(5mo ago)012MITPHPPHP ^8.1

Since Dec 9Pushed 5mo agoCompare

[ Source](https://github.com/theRanken/ectype)[ Packagist](https://packagist.org/packages/theranken/ectype)[ RSS](/packages/theranken-ectype/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Ectype - Supercharge Your Enums
===============================

[](#ectype---supercharge-your-enums)

A PHP library that provides powerful traits and attributes to enhance your enums with labels, collections, and Laravel translation support.

Features
--------

[](#features)

- **Labels**: Automatically generate human-readable labels or use custom labels via attributes.
- **Translation**: Built-in support for Laravel's translation system (Laravel projects only).
- **Collections**: Convenient methods to work with enum collections (names, values, select options).
- **Invokable**: Make enum cases callable to return their backing values.
- **Framework Agnostic**: Works in any PHP 8.1+ project, with optional Laravel integration.

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

[](#installation)

Install via Composer:

```
composer require theranken/ectype
```

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 9+ (for translation features)

Usage
-----

[](#usage)

### Basic Enum with Labels

[](#basic-enum-with-labels)

```
