suleymanozev/enum-field
Enum Field for Filament provides a simple Laravel form component that turns PHP enums into selectable options, with support for labels, colors, and validation so enum-backed values are easy to manage in Filament admin panels.
What the package is. suleymanozev/enum-field is a Laravel Nova form field whose stated purpose is rendering PHP enum cases in the Nova admin UI. Nova custom fields are structurally thin: a PHP class extending Laravel\Nova\Fields\Field (typically $component = 'enum-field', plus resolve/fillUsing/displayUsing hooks) and a compiled Vue component registered through Nova::script() / Nova::style() in the service provider. The surface area is small, which caps both the upside and the blast radius.
Architecture fit. Only relevant if we already run Nova — a paid, closed-source product with a per-site license. If our admin layer is Filament, Blade, Inertia, or Livewire, this package is inapplicable and the evaluation ends there. Even inside a Nova estate, the fit is narrow: Nova's built-in Select field plus Eloquent's native enum casting (protected $casts = ['status' => Status::class]) already covers the majority of enum-editing use cases. The package only earns its place if it adds something Select does not: label resolution via a HasLabel interface, automatic rule generation from Enum::cases(), index-column formatting, or enum-aware filtering.
Integration feasibility. Mechanically easy — Composer install, service provider auto-discovery, optional nova:publish for assets. The real gate is version-matrix compatibility: PHP 8.1+ (enums), the Laravel major we run, and critically the Nova major (4 vs 5 have divergent field APIs and Vue versions). Nova itself installs from a private Composer repository requiring license credentials, which means CI and onboarding pipelines need that credential plumbed through regardless.
Technical risk. High relative to value, driven almost entirely by provenance rather than code:
dist/ assets or ship prebuilt bundles of unknown provenance. An unbuilt component manifests as a silently blank field, which is a confusing failure to diagnose mid-release.Score: 0 look like incomplete scraping rather than a genuinely zeroed repo. Either way, there is no observable adoption to weigh.Note the runtime risk is low: the code is small, deterministic, and UI-scoped. The risk is governance, not correctness.
Key questions before any further investment.
composer.json constraints for php, laravel/framework, and laravel/nova? Is Nova 5 supported?dist/js and dist/css, or require a local Node build?displayUsing on index/detail?Recommendation: do not adopt as a dependency. The capability gap it closes is 2–4 hours of in-house work, and the cost of ownership — an unmaintained third-party package inside the admin panel, plus fork maintenance at the next Nova major — exceeds that. Two acceptable paths, in preference order:
Path A — native Nova Select (preferred, zero new dependencies).
Select::make('Status')->options(Status::labels()) where labels() is a small static helper on the enum (or a HasLabel trait we own).->displayUsing(fn ($value) => $value?->label()) for index/detail rendering and a Nova Filter for enum-scoped list views.EnumSelect factory in our own app/Nova/Fields namespace so every resource gets consistent behaviour.Path B — fork and vendor, if the package genuinely does more than Select.
nova:publish is not a manual step.Stack fit and compatibility checks. Confirm PHP ≥ 8.1, our Laravel major, and Nova major against the package constraints before anything else. Validate behaviour on: nullable enums, pure enums, int-backed enums, and enums whose cases carry per-case metadata. Confirm the component works under our CSP if we enforce one.
Migration path. There is nothing to migrate from — this is greenfield field adoption. If we ever want off it, swapping a custom field for Select is a per-resource edit, reversible in an afternoon. That reversibility is precisely why Path A is safe to choose now.
Sequencing. Do this outside a feature release: one PR adding the field factory plus enum label helpers, one PR converting resources, one PR adding a filter. No coupling to schema or migration work.
Maintenance. Path A is effectively zero marginal cost — it lives in our codebase, inherits our linting and tests, and moves with our Laravel/Nova upgrades on our schedule. Path B costs a fork to track: cheap per year, but non-zero, and it silently rots until a Nova upgrade forces the issue.
Support. With no maintainer community, support is entirely internal regardless of path. That asymmetry — same support burden, but one option adds a third-party dependency — is the core argument against adoption.
Scaling. Negligible. This is presentation-layer code over a fixed enum set; no query, memory, or throughput implications. If anything, generating options from Enum::cases() is cheaper and safer than hand-maintained option arrays, which is the one genuine correctness win on offer.
Failure modes to watch.
ValueError during hydration, surfacing as a 500 on the Nova index rather than a form-level validation error. Mitigate with a data migration on every enum change and a defensive accessor.fillUsing normalizes.Ramp-up. Under an hour for any Laravel developer familiar with Nova — the field API is declarative and the enum side is standard PHP 8.1. Document the enum-label convention in the engineering handbook so new resources use the shared factory rather than reaching for raw string options.
How can I help you explore Laravel packages today?