© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Jon Mason

multi-tenancy - tenant relationship on every single table?

I know I've seen somewhere in the documentation or online where you don't have to have the tenant relationship on every single table. For example, if the parent already has the tenant relationship, then the child table doesn't need it. I have a
locations
locations
table that has the
team_id
team_id
and then a
vendors
vendors
table that has a
location_id
location_id
. How can I attribute the vendor to the team indirectly through the locations table without defining a
team_id
team_id
FK on the vendors table?
Solution
Is this a case of using "hasOneThrough" or "hasManyThrough"? I haven't hit this exact situation, but it feels about right. https://laravel.com/docs/10.x/eloquent-relationships#has-many-through
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Laravel - The PHP Framework For Web Artisans
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Multi-Tenancy HasManyThrough Tenant Relationship
FilamentFFilament / ❓┊help
3y ago
Multi tenancy - Select relationship() - Searchable() remove tenant information when clicked
FilamentFFilament / ❓┊help
3y ago
Multi Tenancy associate Tenant to Resource
FilamentFFilament / ❓┊help
2y ago
How to configure filament with multi-tenancy (Single DB) for one to one relationship with tenant ?
FilamentFFilament / ❓┊help
2y ago