lara-zeus/tabler-icons-enum
A Laravel enum for Tabler Icons that exposes every icon name as a typed PHP case. Use it to populate selects, validate icon choices, and reference Tabler icons cleanly in Filament forms or Blade views without hard-coded strings or manual lists.
What this package is (and isn't). lara-zeus/tabler-icons-enum is a single-purpose data package: a PHP backed enum whose cases enumerate Tabler Icons names, plus a label() helper and a convenience accessor for Filament select/form options. There is no runtime logic, no persistence, no request-path code, and effectively no service-provider surface. This reframes the TPM decision: it is not a platform dependency, it is a vendored lookup table. It should be judged on the accuracy and stability of its case list, not on architecture. That framing keeps the decision appropriately small and keeps the downside bounded.
Architecture fit. Good fit where the organisation has already standardised (or is standardising) on Tablor—correction, on Tabler Icons—as the icon vocabulary for Laravel/Blade surfaces and Filament admin panels. The value proposition is narrow and real: icon references become type-checked identifiers rather than free-text strings, so a typo fails at analysis/review time instead of rendering blank space in production. Where the fit is poor: teams on Heroicons, Lucide, or Font Awesome get nothing; teams that need runtime icon metadata (SVG paths, categories, search, weight variants) get nothing; teams with a strict low-dependency-count policy should treat the build path as the default.
Integration feasibility. Mechanically trivial—composer require lara-zeus/tabler-icons-enum, PHP 8.1+ for backed enums, Composer autoload, reference cases in Blade/components/Filament option arrays. The genuine feasibility work is not installation but inventory and codemod: finding every hardcoded icon string across templates, config, and (hardest) database columns, and converting them file-by-file behind normal PRs. Budget that as an engineering task with a reviewer, not as a chore.
Technical risk.
2.0.1 — Filament 5. That tells us the enum's major line tracks the Filament release cadence, not the Tabler icon set. If we are on Filament 4, we likely need the 1.x line; if we are unconstrained by Filament, this coupling is dead weight we inherit for free.2026-03-11) that reads as unreliable. None of this disqualifies a data package, but it removes "the ecosystem will catch regressions for us" as a mitigation and makes our own verification test non-optional.app/Support/, is legally and practically available at trivial cost. State this explicitly in any approval—it is what makes the rest of the risk acceptable.Key questions to put to engineering before approval.
ti ti-* classes or SVG sprite IDs—and is the enum-to-markup mapping 1:1 and tested?Stack fit. PHP 8.1+ floor, Laravel 10/11/12, Blade, optionally Filament. Confirm from composer.json the PHP floor and the filament/filament constraint before committing—a raised PHP floor cascades into runtime images and CI with no product benefit. If we are not on Filament, adopt the enum content and treat the Filament helpers as unused convenience.
Buy-versus-generate, priced explicitly. Because the artifact is generated, the TPM should force the comparison rather than defaulting to "composer require":
| Option | Cost | Control | Residual risk |
|---|---|---|---|
Adopt 2.0.1 |
~1 hour | None; tracks vendor's Tabler version | Single-maintainer dependency; silent drift |
| Fork under org namespace | ~1 day + trivial upkeep | Full; we pin the Tabler version | We own the generator |
| Generate in-house | 0.5–1 eng-day, then CI | Full; CI fails on unknown icons | Small upfront spend |
Default recommendation: adopt for the spike; plan to generate or fork within a quarter if the package becomes load-bearing. The build cost is low enough that a single-maintainer dependency is a poor long-term trade for icon rendering in production admin UI.
Migration path.
ti ti-, tabler-, and icon keys in config. Database-stored icons (e.g. a menu_items.icon column) are the hard part—those need validation rules and a backfill, not just a codemod.Icon::from(string)) wherever the value is user- or data-supplied.composer.lock, or vendor the enum into app/Support/ and drop the dependency. Both are one-day options; make the team name which one they'd take.Compatibility. Package major must match Filament major; enum content must match the Tabler asset version actually shipped. Sequencing: do not bundle this with a Filament major upgrade. Upgrade Filament first, then adopt the enum, so any visual regression is attributable to one change. Roll out per feature area, with the governance test landing before the first production merge.
Maintenance. Effectively zero at runtime; the real cost is refresh discipline. Each Tabler release adds icons the enum won't have (harmless) and may rename icons the enum still exposes (a breaking change for us). Standing cost: run the governance test on every icon or dependency change, and re-check the enum when we bump the Tabler asset. Assign a named owner—an unowned single-maintainer data dependency is the failure mode to avoid.
Support. No vendor SLA of any kind. Support path is the GitHub issue tracker of a one-maintainer project, with a documented MIT fork as the real fallback. Because the artifact is small and the licence permits it, "we take the generator in-house" is a credible, low-cost answer to abandonment—say so up front so it never becomes an escalation.
Scaling. Runtime scaling is a non-issue: an enum is compile-time data held in opcache, costing nothing per request. Scaling pressure is developer-experience only—a multi-thousand-case enum slows IDE indexing and static analysis. If that bites, filter at the point of use (Enum::cases() behind a helper returning a curated subset) rather than trimming the package.
Failure modes to plan for.
Enum::cases() and a backfill.Ramp-up. Under an hour for an engineer who knows PHP enums: install, browse cases via IDE autocomplete, swap literals. The learning is not the package, it is the org convention—"icon references must be enum cases"—which needs to be stated in the code review checklist and the definition of done for UI work. Without that convention the package delivers autocomplete and nothing else; with it, broken icons move from a manual QA step to a compile-time failure. That convention is the deliverable a TPM owns here.
How can I help you explore Laravel packages today?