- What is tomatophp/filament-types-module used for?
- It is a Filament panel module for managing a shared table of types, categories, or statuses from an admin interface instead of hand-rolling a categories table for every entity. Types are stored in the database and attached to arbitrary Eloquent models through a polymorphic typeable-style relation. It suits projects with two or three or more entities that need consistent classification and a single admin surface for editing those values. It is a UI layer, so the underlying Type model and migrations likely come from a companion TomatoPHP package.
- How do I install filament-types-module in a Laravel app?
- Installation follows the standard TomatoPHP module pattern: require the package with Composer, publish its migrations and config, run the migrations, then register the plugin in your Filament panel provider. Expect two packages, since the resource depends on a sibling core types package that owns the model and schema. Confirm the exact commands against the repository README before running them, as the v1.0.0 release notes are only a changelog link.
- Which Filament and Laravel versions does this package support?
- The v1.0.0 release notes do not publish a compatibility matrix, so the constraints must be read from the package composer.json. TomatoPHP modules have historically tracked Filament majors, moving from v3 to v4, so verify whether your pinned Filament version is supported before adopting. Do not assume v4 support just because the module family is active; check the requirement lines and test against your panel in a branch.
- Do I need the companion tomato-php/types package as well?
- Almost certainly yes. This repository is the Filament UI layer, while the Type model, migrations, and relation traits are expected to live in a sibling core package. That means you are adopting at least two packages with a version-locked pair rather than a single standalone library. Pin both and review diffs on upgrade, because the UI module and the core model need to move together.
- How do I attach a type to an existing Eloquent model?
- The pattern is a polymorphic relation: your model uses the provided typeable trait or contract, and types are linked through a pivot table keyed by type id plus the owning model's morph type and id. In Filament forms you can then use the package's form component to pick a type from the managed list. Check the published migration to confirm whether the package creates the pivot table or only the types table, since that determines how much schema you own.
- Does filament-types-module support multi-tenancy?
- Multi-tenancy is not documented in the release notes, so treat it as an open question. Before adopting, check whether the resource scopes queries by tenant and whether the types table has a tenant column or a global scope hook. If your panel uses Filament's built-in tenancy, plan to test type visibility with two tenants, and be ready to add your own scoping if the resource is global.
- What happens to child records when a type is deleted?
- Referential integrity here is application-enforced, not database-enforced, because the relation is polymorphic. Determine whether the package uses soft deletes on types and what your pivot rows do when a type disappears. A safe approach is to soft delete types, keep the pivot rows, and filter inactive types out of selection lists so historical records retain their labels. Verify the actual behavior in a staging database before relying on it.
- Is v1.0.0 stable enough for production?
- Version 1.0.0 is the first tagged release and ships with a bare changelog link: no enumerated features, no upgrade path, and no stated support matrix. That is usable for production if you pin the version, read the source, and accept the maintenance burden of a fast-moving module family. Review test coverage and CI status first, since a trusted regression suite is what makes rapid vendor iteration safe.
- How does this compare to spatie/laravel-tags or building my own categories table?
- Spatie packages give you a mature, well-documented tagging API without a Filament admin UI, while this module gives you the admin resource out of the box but with a younger API surface. Building your own is reasonable when you have a single entity to classify or your taxonomy is hierarchical and query-heavy, because a shared polymorphic table makes reporting joins heavier over time. Choose this package when you already run Filament and want one managed type list across several resources.
- Can I customize the types resource, such as adding colors, icons, or ordering?
- Customization should be possible through the usual Filament extension points, but the public API is not documented and no stability promise is stated for 1.x. Expect to extend the resource class, publish views, or override form schema, and be prepared to hit edges such as ordering fields, translatable labels, and per-tenant scoping earlier than the demo suggests. Keep your customizations in your own resource subclass so vendor updates do not overwrite them.