mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:14:04 +00:00
Fix #998, centralize config used by BelongsToTenant and HasDomains
This commit is contained in:
parent
942d79cbd7
commit
dd0f03f742
14 changed files with 41 additions and 32 deletions
|
|
@ -18,7 +18,7 @@ class DomainTenantResolver extends Contracts\CachedTenantResolver
|
|||
{
|
||||
$domain = $args[0];
|
||||
|
||||
$tenant = config('tenancy.tenant_model')::query()
|
||||
$tenant = config('tenancy.models.tenant')::query()
|
||||
->whereHas('domains', fn (Builder $query) => $query->where('domain', $domain))
|
||||
->with('domains')
|
||||
->first();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue