GoFilament
You're reading the docs for v1.23.0, an older release. Go to v1.40.1 (latest).

Docs v1.23.0 Guide

Multi-Tenancy & Tenant Switcher

GoFilament integrates natively with GoLaravel’s privacy.TenantMixin, providing tenant resolution, automatic privacy scope injection, and an interactive topbar organization switcher:

panel := filament.NewPanel("admin").
    Path("/admin").
    Tenancy(&filament.TenantConfig{
        Enabled:         true,
        PathScoping:     true, // scoped URLs: /admin/{tenant}/...
        RegistrationURL: "/admin/tenants/new",
        ProfileURL:      "/admin/{tenant}/settings",
    }).
    TenantLoader(func(ctx *filament.Context) ([]filament.Tenant, error) {
        // Return workspaces accessible to the authenticated user
        return []filament.Tenant{
            filament.TenantItem{Key: "acme", Name: "Acme Corp"},
            filament.TenantItem{Key: "wayne", Name: "Wayne Enterprises"},
        }, nil
    })
  • Seamless Privacy Integration: Automatically injects privacy.WithTenantID into standard context.Context, scoping all Ent queries and mutations without manual WHERE tenant_id = ? clauses.
  • Flexible Resolution: Resolves tenants via route params (:tenant), cookies (filament_tenant), headers (X-Tenant-ID), subdomains ({tenant}.app.com), or custom resolvers.
  • Instant Switcher Dropdown: Live dropdown in topbar with avatar initials, organization switching links, and settings/registration buttons.

Generated from README.md at v1.23.0 · released Nov 7, 2026