PHPackages                             repat/laravel-mysql-enum-values - 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. [Database &amp; ORM](/categories/database)
4. /
5. repat/laravel-mysql-enum-values

ActiveLibrary[Database &amp; ORM](/categories/database)

repat/laravel-mysql-enum-values
===============================

Small Laravel Query Builder Macro that returns valid values for a MySQL ENUM

0.1(3y ago)02[4 PRs](https://github.com/repat/laravel-mysql-enum-values/pulls)MITPHPPHP ^8.1

Since Jul 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/repat/laravel-mysql-enum-values)[ Packagist](https://packagist.org/packages/repat/laravel-mysql-enum-values)[ Docs](https://github.com/repat/laravel-mysql-enum-values)[ RSS](/packages/repat-laravel-mysql-enum-values/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (8)Versions (6)Used By (0)

[![](https://camo.githubusercontent.com/2bedf63f24cda7efab02da955dc11fb7ef8a060e2f26b73c33a7aac84529b8a3/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f737570706f72742d756b7261696e652e7376673f743d31)](https://supportukrainenow.org)

laravel-mysql-enum-values
=========================

[](#laravel-mysql-enum-values)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3580d2ca1fc9e8cf5292a1d7ff86f44b188dfc6e0d6a3e70cd84df530203df38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657061742f6c61726176656c2d6d7973716c2d656e756d2d76616c7565732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/repat/laravel-mysql-enum-values)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1b5a586710d1d4f64aefde5fc2cc58ca09cfd20b3784845e6d9714b172a90099/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f72657061742f6c61726176656c2d6d7973716c2d656e756d2d76616c7565732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/repat/laravel-mysql-enum-values/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b0dab1ac94b4fdc357e4399e6c79975fc7a8bb347d1b4d58bba83397a2985f5a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f72657061742f6c61726176656c2d6d7973716c2d656e756d2d76616c7565732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/repat/laravel-mysql-enum-values/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0e9793cff40e72a77872510acd8647e0ab4d15a7b6e3470c3f82b3724f25c20a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72657061742f6c61726176656c2d6d7973716c2d656e756d2d76616c7565732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/repat/laravel-mysql-enum-values)

**laravel-mysql-enum-values** is a small Laravel Query Builder [macro](https://tighten.com/blog/the-magic-of-laravel-macros/) that returns the valid values of an [ENUM field for MySQL](https://dev.mysql.com/doc/refman/8.0/en/enum.html). Under the hood it's using this statement:

```
SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_NAME = 'table' AND COLUMN_NAME = 'column'
```

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

[](#installation)

You can install the package via composer:

```
composer require repat/laravel-mysql-enum-values
```

Usage
-----

[](#usage)

The package contains only one macro: `enumValues`. The Service Provider is automatically loaded.

```
DB::table('users')->enumValues('status'); // ['active', 'inactive']
```

License
-------

[](#license)

- MIT, see [LICENSE](https://github.com/repat/laravel-mysql-enum-values/blob/master/LICENSE)

Version
-------

[](#version)

- Version 0.1

Contact
-------

[](#contact)

#### repat

[](#repat)

- Homepage:
- e-mail:
- Twitter: [@repat123](https://twitter.com/repat123 "repat123 on twitter")

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=repat&url=https://github.com/repat/laravel-mysql-enum-values&title=laravel-mysql-enum-values&language=&tags=github&category=software)

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/405dab243007488e7e7851422e5864a9312aee36058d60f1e6d623232c4d3131?d=identicon)[repat](/maintainers/repat)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![repat](https://avatars.githubusercontent.com/u/516807?v=4)](https://github.com/repat "repat (4 commits)")

---

Tags

laravelenummysqlvaluesmacrovalidrepat

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/repat-laravel-mysql-enum-values/health.svg)

```
[![Health](https://phpackages.com/badges/repat-laravel-mysql-enum-values/health.svg)](https://phpackages.com/packages/repat-laravel-mysql-enum-values)
```

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k25.2M34](/packages/kirschbaum-development-eloquent-power-joins)[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[watson/validating

Eloquent model validating trait.

9723.3M46](/packages/watson-validating)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-laravel-wallet)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
