Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Subtenant Scope Laravel Package

leek/filament-subtenant-scope

Adds second-level tenancy to Filament panels with a top-nav dropdown that scopes all Eloquent queries to a sub-tenant (region, location, department, etc.). Persists via session/URL and auto-filters resources, widgets, badges, and global search.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Multi-level tenancy for SaaS platforms: Enables granular access control beyond traditional tenant isolation (e.g., companies → regions/branches/departments). Aligns with roadmap for enterprise-grade segmentation (e.g., "Show me only my region’s data").
  • Build vs. Buy: Avoids custom development of scoped queries, URL persistence, and UI components for sub-tenancy. Reduces technical debt by leveraging Filament’s ecosystem.
  • Use Cases:
    • Regional SaaS: Filter data by geographic regions (e.g., "North America" branch).
    • Internal Tools: Department-specific dashboards (e.g., "Marketing" vs. "Sales" views).
    • Shared Tenants: Multi-tenant apps where sub-tenants share a parent tenant (e.g., franchises under a brand).
  • UX Consistency: Standardizes scoped navigation across all Filament panels, reducing onboarding friction for admins/users.
  • Data Isolation: Enables soft-scoped queries without hardcoding logic in every resource (e.g., ->where('region_id', $subTenant)).

When to Consider This Package

  • Adopt if:
    • You use Filament v4/v5 and need multi-level tenancy (e.g., tenant → sub-tenant).
    • Your app requires persistent, URL-shareable filters that apply globally (not just per-resource).
    • You want to avoid repetitive query-scoping logic across Eloquent models.
    • Your team lacks bandwidth to build a custom solution for sub-tenant filtering.
  • Look elsewhere if:
    • You need hard tenancy (database-level isolation) instead of soft-scoping.
    • Your sub-tenancy logic requires complex business rules (e.g., dynamic permissions per sub-tenant).
    • You’re not using Filament/Livewire (package is tightly coupled).
    • You need multi-select sub-tenants (current version supports single selection only).
    • Your app uses PHP < 8.2 or Filament < v4.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us add a second layer of data segmentation—like filtering by region or department—without rewriting every query. Imagine giving admins a dropdown to switch between ‘North America’ and ‘Europe’ views, with all dashboards, searches, and lists auto-updating. It’s like multi-tenancy for sub-groups, built in hours not months. Low risk (MIT license), high ROI for SaaS scalability."

For Engineering:

*"A drop-in solution for global sub-tenant scoping in Filament:

  • 1 trait + 1 config array replaces manual ->where() calls across models.
  • URL-persistent filters: No session storage needed; just append ?subtenant=region_id to URLs.
  • Zero resource modifications: Works across all Filament panels/resources/widgets.
  • Lightweight: ~500 LOC, MIT licensed, actively maintained (last release: May 2026). Tradeoff: Single-selection only (no multi-tenant dropdowns yet)."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky