PHPackages                             peltonsolutions/filament-enums - 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. peltonsolutions/filament-enums

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

peltonsolutions/filament-enums
==============================

A custom package for Filament for handling enum values in Filament Admin.

1.2.0(8mo ago)2166[4 PRs](https://github.com/peltonsolutions/filament-enums/pulls)MITPHPPHP ^8.2CI passing

Since Feb 5Pushed 2w agoCompare

[ Source](https://github.com/peltonsolutions/filament-enums)[ Packagist](https://packagist.org/packages/peltonsolutions/filament-enums)[ Docs](https://github.com/peltonsolutions/filament-enums)[ RSS](/packages/peltonsolutions-filament-enums/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (5)Versions (12)Used By (0)

filament-enums
==============

[](#filament-enums)

filament-enums is an extension to the peltonsolutions/laravel-enums package, designed specifically for Laravel developers. This package simplifies working with enumerated values in your Filament applications, thus enhancing the readability and maintainability of your code.

Like the laravel-enums package, filament-enums supports the use of named constants, improving the organization and clarity of your code. It leverages the features provided by laravel-enums, complementing them with additional functionalities tailored for Filament.

Optionally, this package allows you to make your Enum fields nullable through the `NullableEnum` class extension.

Install
-------

[](#install)

You can install the package via composer using the following command:

```
composer require peltonsolutions/filament-enums
```

Example:

```
class ContentPageStatus extends \PeltonSolutions\LaravelEnums\Models\Enum
{
	const DRAFT = 'draft';
	const SCHEDULED = 'scheduled';
	const PUBLISHED = 'published';
	const ARCHIVED = 'archived';

	public static function map(): array
	{
		return [
			static::DRAFT => trans('content_page.statuses.draft'),
			static::SCHEDULED => trans('content_page.statuses.scheduled'),
			static::PUBLISHED => trans('content_page.statuses.published'),
			static::ARCHIVED => trans('content_page.statuses.archived'),
		];
	}
}
```

```
class ContentPage extends Model
{
	protected $casts = [
		'status' => ContentPageStatus::class
	];
}
```

```
class ContentPageResource extends Resource
{
	protected static ?string $model = ContentPage::class;

	public static function form(Form $form): Form
	{
		return $form
			->schema([
				\PeltonSolutions\FilamentEnums\Models\Forms\Components\EnumSelect::make('status')
						  ->default(ContentPageStatus::DRAFT);
	}
}
```

This will create a Select component that:

1. Gives options from the `map()` function
2. Makes the field required if it's not `\PeltonSolutions\LaravelEnums\Models\NullableEnum`
3. Requires that the selected value matches one of the `map()` keys

Testing
-------

[](#testing)

To ensure that laravel-enums is functioning correctly, you can run the package's tests using:

**NOTE: Tests are WIP. Having troubles writing tests that require the `$record` to tbe passed into the closures.**

```
composer test
```

### Security

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nathan Pelton](https://www.nathanpelton.com)

License
-------

[](#license)

filament-enums is open-sourced software. It's licensed under the [MIT license](https://opensource.org/licenses/MIT), which is a permissive license allowing the software to be used, modified, and shared.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance81

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~105 days

Recently: every ~155 days

Total

7

Last Release

245d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/41953789?v=4)[Pelton Solutions, LLC](/maintainers/peltonsolutions)[@peltonsolutions](https://github.com/peltonsolutions)

---

Top Contributors

[![nathanpelton](https://avatars.githubusercontent.com/u/29257226?v=4)](https://github.com/nathanpelton "nathanpelton (27 commits)")

---

Tags

laravelfilamentpeltonsolutionsfilament-enums

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/peltonsolutions-filament-enums/health.svg)

```
[![Health](https://phpackages.com/badges/peltonsolutions-filament-enums/health.svg)](https://phpackages.com/packages/peltonsolutions-filament-enums)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3891.8k](/packages/codewithdennis-larament)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

461.7k](/packages/ercogx-laravel-filament-starter-kit)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.6k2](/packages/crumbls-layup)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k16](/packages/wsmallnews-filament-nestedset)

PHPackages © 2026

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