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

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

paulocjota/friendly-enum
========================

FriendlyEnum is a PHP trait used to handle enum fields in Laravel framework in an easy way.

21PHP

Since Apr 5Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![friendly-enum](logo.png)](#)

 [About](#about) • [Getting started](#getting-started) • [API Reference](#api-reference) • [Technologies](#technologies) • [Author](#author) • [License](#license)

About
-----

[](#about)

FriendlyEnum is a PHP trait used to handle enum fields in Laravel framework in an easy way.

#### The problem it solves

[](#the-problem-it-solves)

You create an enum field in the migration file with user states for example. As the system is developed you also need the values in the views, in Form Requests / validators and many other places. Now a change is needed in the system to support one more state. Good luck remembering in each place that you need to change. This package tries to solve this problem.

Getting started
---------------

[](#getting-started)

### Install the package

[](#install-the-package)

```
composer require paulocjota/friendly-enum
```

### Setting up

[](#setting-up)

```
