team_id, organization_id), global scopes, or separate connection tables — register subclasses early in AppServiceProvider::register().
Registrar API
Invalid classes throw
InvalidArgumentException at registration time.
Example: tenant-scoped form
app/Models/TenantFlexForm.php
flex_forms, flex_form_submissions, flex_form_integration_connections, …) — do not rename tables unless you override $table consistently.
Resolving models in your code
Use the registrar instead of hard-coded class names:Connections and deliveries
When swapping connection/delivery models:- Keep
credentialsencrypted cast for OAuth tokens — OAuth token management - Scope Connections per tenant the same way as forms
- Delivery rows power admin replay UI — preserve foreign keys to submissions
Policies and authorization
Register policies on your subclass if Filament resolves$record as the custom model:
uploads.authorize, authorizeAbilityUsing).