tomatophp/filament-meta
TomatoPHP Filament Meta adds flexible meta data fields to Eloquent models and Filament resources, letting you manage SEO tags, custom attributes, and extra per-record settings directly from Filament forms and tables. A lightweight way to extend models without schema changes.
Build vs. buy vs. defer on metadata authoring. This package is a thin polymorphic key/value side table (model_type, model_id, key, value) plus a trait and a Filament relation manager. That is roughly one to two days of an engineer's time, packaged. The value is not capability — nothing here validates, types, filters, or aggregates — it is speed and convention. So the honest framing is: this collapses a "should we build a meta system?" debate into a one-week spike with a working artifact. Use it to answer the question rather than to avoid it.
Scope decisions on SEO. The package's clearest job is per-record SEO: title, description, keywords, Open Graph and Twitter card values, editable inline on an existing resource. If SEO is on the roadmap, adopt it to produce a real editor experience for one content model (Page or Post) with a handful of keys. That artifact — a screenshot of an editor filling in a title and description on a Page — is worth more in a planning meeting than another estimate.
Roadmap sequencing: which model gets it first. The trait is one line, so the marginal cost of enabling another model is near zero, but the marginal cost of supporting it is not. Pick one owner model deliberately; treat each additional model as a separate small decision with its own key allowlist.
Key schema governance as a product decision, not a technical one. The package accepts free-text keys, which becomes seo_titel, seo-title, and seoTitle within a sprint. A PM should own the approved key list and its formats (title ~60 chars, description ~155, separator conventions) as a written conventions doc. This is the single highest-leverage thing you can do here — editors become the schema if you don't.
Localization / market-launch decisions. If localized SEO is a future requirement, model the locale in the key (seo_title.en, seo_title.fr) rather than committing to new schema. It costs nothing today and keeps the door open. Use it to defer a localized-content architecture decision without painting yourself into a corner.
Whether metadata needs to be a query surface. Meta is an authoring and rendering store, not a reporting store. The moment a stakeholder asks to filter, sort, export, or report on a meta value, that is a signal to promote that key to a real column — not to extend the meta system. Write this down before the first request arrives, because saying yes to a meta-based report is how these pilots quietly die.
Prioritizing editor completeness work. Fallback chains, character-limit validation, and a "SEO complete" badge in the resource table are small pieces of product work that make a bare key/value store feel finished. Editors fill ~60% of fields and expect the rest to look right; the fallback chain is what turns a pilot into something you can ship. Budget for it — it is not in the package.
Buying an exit option, not a dependency. MIT plus a single maintainer and 0 dependents means you should adopt with a vendor/fork plan on day one. That is a one-command exit strategy and it makes the adoption decision cheap and reversible, which is exactly what you want for a capability experiment.
Adopt when all or most of these hold:
meta column, no settings package already owning these keys. Two storage locations for "metadata" is the most common way this pilot fails six months later; if you already have one, decide now which owns which keys, in writing.value column and unique index are sane, what the trait actually exposes, and whether the relation manager respects policies and tenancy. If nobody can answer those, you are not ready to adopt.Look elsewhere — or build the day of work yourself — when:
putMeta('is_featured', true) becomes "1". Keep booleans, numbers, and anything structured in real columns.To executives — one paragraph.
There is a small, MIT-licensed package that lets editors manage SEO titles, descriptions, keywords, and social-sharing tags directly on the pages they already edit in our admin panel, instead of us building that editor from scratch. It gets us a working, demoable SEO authoring experience for one content type in about a week, at effectively no licensing cost, and because it's MIT we can walk away from it cheaply if it doesn't fit. It is not a platform commitment — it's the cheapest way to find out whether SEO authoring is worth investing in, and the exit cost is low and known.
To engineering — the honest trade.
This is the one-to-two-day implementation we'd write ourselves, packaged: a polymorphic key/value table, a trait, and a Filament relation manager. Adopt it for speed and convention, not capability. Three conditions: we wrap it behind our own trait so package types never leak into resources or Blade, we add a unique index on
(model_type, model_id, key)before writing a single row (and useupdateOrCreateeverywhere), and we allowlist keys via an enum so editors can't invent them. We pin the version and keep a fork buildable; the fork is the support contract. First spike: one model, ~5 keys, exercised end-to-end including as a user who shouldn't have permission, with a query-count check on the list view so we catch the N+1 before it ships.
What success looks like (the acceptance criteria to agree up front):
What to watch, in plain terms: duplicates silently winning ("wrong title in production"), N+1s in table and Blade loops, orphaned rows when a record is deleted, free-text keys fragmenting within a sprint, and Filament major upgrades breaking the relation manager. Each has a named owner and a calendar item, or the pilot isn't ready.
How can I help you explore Laravel packages today?